embedified
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Embedified

Extremely lightweight NPM package which allows you to easily create embeds

Using Discord.js

const { EmbedBuilder } = require('embedified');

client.on('messageCreate', (message) => {
  const embed = new EmbedBuilder();
  embed.setTitle('Title');
  embed.setColor('#2b2d31');
  embed.setDescription('Description');
  embed.addFields([
    {
      name: 'Name',
      value: 'Description',
      inline: true,
    },
  ]);

  message.channel.send({ embeds: [embed] });
});

Using Webhooks

const { Webhook } = require('discord-webhook-handler');
const { EmbedBuilder } = require('embedified');
const webhook = new Webhook('YOUR_WEBHOOK_URL');

const embed = new EmbedBuilder();
embed.setTitle('Title');
embed.setColor('#2b2d31');
embed.setDescription('Description');
embed.addFields([
  {
    name: 'Name',
    value: 'Description',
    inline: true,
  },
]);

webhook.send({ embeds: [embed.toJSON()] });

Readme

Keywords

none

Package Sidebar

Install

npm i embedified

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

3.88 kB

Total Files

5

Last publish

Collaborators

  • lttrvqss