1.0.0 • Published 8 months ago

@verleihnix/discord-embed v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

A easy Way to create Embeds for your Discord Bot!

Installation

You can install it via npm:

npm install @verleihnix/discord-embed

Usage

Here is an simple Code:

const { Client, GatewayIntentBits } = require('discord.js');
const Embed = require('@verleihnix/discord-embed');

const client = new Client({ intents: [] });

client.on('messageCreate', (message) => {
  if (message.content === '!embed') {
    const embed = new Embed()
      .title('Title')
      .desc('Description')
      .color('Orange') 
      .newField('Field Name', 'Value', false)
      .footer('Footer', 'https://example.com/icon.png')
      .time(new Date())
      .image('image link')
      .url('Link')
      .author('Author Name', 'author icon url')
      .thumbnail('thumbnail link')
      .build();

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

client.login('YOUR_BOT_TOKEN');
1.0.0

8 months ago