const { Client, Events, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.GuildMessageReactions] });
client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});
client.on('message', message => {
if (message.content === "!avatar") {
const embed = new RichEmbed()
.setTitle('Avatar!')
.setAuthor("Your Avatar", message.author.avatarURL)
.setImage(message.author.avatarURL)
.setColor('RANDOM')
.setDescription('Avatar URL')
message.reply(embed)
}
});
// Log in to Discord with your client's token
client.login("");
const { Client, Events, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.GuildMessageReactions] });
client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});
client.on('message', message => {
if (message.content === "!avatar") {
const embed = new RichEmbed()
.setTitle('Avatar!')
.setAuthor("Your Avatar", message.author.avatarURL)
.setImage(message.author.avatarURL)
.setColor('RANDOM')
.setDescription('Avatar URL')
message.reply(embed)
}
});
// Log in to Discord with your client's token
client.login("");