Every line of 'discordjs api' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
23 async main (message, [query, branch = 'stable']) { 24 await this.search(message, query, 'main', branch) 25 }
159 editEmbed(data) {return this.client.rest.editGuildEmbed(this.id, data);}
8 botEmbed(message, bot) { 9 const embed = new RichEmbed({ color: 0xF87000 }) 10 .setFooter(bot.user.tag, bot.user.displayAvatarURL); 11 return message ? embed.setAuthor(message.author.tag, message.author.displayAvatarURL) : embed; 12 }
31 async commando (message, [query]) { 32 await this.search(message, query, 'commando') 33 }
360 public GetGuilds(): Discord.Guild[] { 361 return this.bot.guilds.array(); 362 }
16 async run(message) { 17 const settings = message.settings 18 const channel = message.channel 19 const embed = new RichEmbed() 20 .setAuthor(`#${channel.name}`, message.guild.iconURL) 21 .setColor(settings.embedColor) 22 .addField('Topic', `${channel.topic}`, false) 23 .addField('Position', `${channel.position}`, true) 24 .setTimestamp() 25 .setFooter(settings.embedFooter, settings.embedIcon) 26 return ({ embed }).catch(e => console.error(e)) 27 }