discord js multiple embeds

Solutions on MaxInterview for discord js multiple embeds by the best coders in the world

showing results for - "discord js multiple embeds"
Leonie
23 Jun 2019
1const Discord = require('discord.js');
2const Client = new Discord.Client();
3
4const { token, prefix } = require('./config.json');
5
6Client.on('ready',() =>{
7  console.log('Ready!');
8})
9
10Client.on('message', message=>{
11
12  let args = message.content.substring(prefix.length).split(" ");
13
14  switch(args[0]){
15   case 'example1':
16   const example1 = new Discord.MessageEmbed()
17   .setColor('#FF8D27')
18   .setAuthor('Text author')
19   .setDescription('Example text')
20    message.channel.send(example1)
21
22   const example2 = new Discord.MessageEmbed()
23   .setColor('#FF8D27')
24   .setAuthor('Test Author')
25   .setDescription('Example text 2')
26   message.channel.send(example2)
27   break;
28  }
29})
30
31Client.on(token)