1.0.3132 • Published 11 months ago

quick-embed v1.0.3132

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

quick-embed

Introduction

Quickly transform your bot responses into an embed instead of plain, boring content!

Information

This is a simple package for turning your bot replies into embeds. You must have discord.js version 14 or above installed to use this package.

This package was developed specifically for Discord bot development and will only function as intended if used with discord.js.

Code Samples

This is a basic ping command for your Discord.JS v14 bot that makes use of the QuickEmbed package.

const { SlashCommandBuilder, CommandInteraction } = require("discord.js");
const QuickEmbed = require("quick-embed"); // Import the QuickEmbed module from the quick-embed package.

module.exports = {
  data: new SlashCommandBuilder()
    .setName("ping")
    .setDescription("View the current latency of the Discord bot."),
  async execute(interaction, client) {
    const ping = client.ws.ping;

    // Create an embed easily.
    QuickEmbed({
      desc: `Ping: ${ping}ms`, // Set the description for your embed.
      interaction: interaction,
    });
  },
};

Installation

To install the package, simply enter npm i quick-embed@latest into your terminal.

Error Codes

If an issue occurs with the package, please check your terminal for an explanation. Otherwise, if you received an error code, please refer to the table below for possible fixes.

Error codeExplanationSolution
ERR_NO_INTERACTThis error will occur if you did not enter the interaction option or if you entered an invalid interaction.You may fix this by adding interaction: interaction to your QuickEmbed code.
ERR_NO_DESCThis error will occur if you fail to provide a description for your embed or if you provide an invalid string. Supported string formats include '', "", or backticks, . | The correct format is desc: ""
ERR_INVALID_COLORThis error occurs when the color for the embed is not formatted correctly. Please specify your chosen embed color in hex-code format.color: "#ff0000" is an example of an appropriate method for setting the embed color.
1.0.3132

11 months ago

1.0.3131

11 months ago

1.0.313

11 months ago

1.0.312

11 months ago

1.0.311

11 months ago

1.0.31

11 months ago

1.0.3

11 months ago

1.0.2-11

11 months ago

1.0.2-1

11 months ago

1.0.21

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago