mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Switch to User#tag in web builds example
This commit is contained in:
@@ -30,7 +30,7 @@ The usage of the API isn't any different from using it in Node.js.
|
||||
client.on('message', msg => {
|
||||
const guildTag = msg.channel.type === 'text' ? `[${msg.guild.name}]` : '[DM]';
|
||||
const channelTag = msg.channel.type === 'text' ? `[#${msg.channel.name}]` : '';
|
||||
console.log(`${guildTag}${channelTag} ${msg.author.username}#${msg.author.discriminator}: ${msg.content}`);
|
||||
console.log(`${guildTag}${channelTag} ${msg.author.tag}: ${msg.content}`);
|
||||
});
|
||||
|
||||
client.login('some crazy token');
|
||||
|
||||
Reference in New Issue
Block a user