Last active
July 29, 2021 02:36
-
-
Save DarrenOfficial/85fdf114ac4f7eb21614761367695ab5 to your computer and use it in GitHub Desktop.
reply when pinged example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.on('message', message => { //this event is fired, whenever the bot sees a new message | |
if (message.isMemberMentioned(client.user)) { //we check, whether the bot is mentioned, client.user returns the user that the client is logged in as | |
const replies = new Discord.MessageEmbed() | |
.setColor('#0099ff') | |
.setTitle('Nathans bot') | |
.setURL('https://cynathans.com') | |
.setAuthor('Some name', 'https://i.imgur.com/wSTFkRM.png', 'https://discord.js.org') | |
.setDescription('Some description here') | |
.setThumbnail('https://i.imgur.com/wSTFkRM.png') | |
.addFields( | |
{ name: 'Regular field title', value: 'Some value here' }, | |
{ name: '\u200B', value: '\u200B' }, | |
{ name: 'Inline field title', value: 'Some value here', inline: true }, | |
{ name: 'Inline field title', value: 'Some value here', inline: true }, | |
) | |
.addField('Inline field title', 'Some value here', true) | |
.setImage('https://i.imgur.com/wSTFkRM.png') | |
.setTimestamp() | |
.setFooter('Some footer text here', 'https://i.imgur.com/wSTFkRM.png'); | |
channel.send(replies); // replies with the embeded that's on the top | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment