// Import the necessary modules
const { Client, IntentsBitField, Partials, MessageEmbed } = require('discord.js');
// Create a new instance of a Discord client
const client = new Discord.Client();
// Define your bot's token here
const token = 'bottoken';
// Set up an event listener for when the bot is ready
client.once('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
// Set up an event listener for incoming messages
client.on('messageCreate', async message => {
// Ignore messages from bots
if (message.author.bot) return;
// Create a new embedded message
const embed = new MessageEmbed()
.setColor('#0099ff') // Set the color of the embed
.setTitle('Example Embed') // Set the title of the embed
.setDescription('This is an example of an embedded message.') // Set the description of the embed
.setImage('https://example.com/image.png') // Set an image for the embed
.setTimestamp(); // Add a timestamp to the embed
// Send the embedded message to the same channel
message.channel.send(embed);
});
// Log in to Discord with your app's token
client.login(token);
// Import the necessary modules
const { Client, IntentsBitField, Partials, MessageEmbed } = require('discord.js');
// Create a new instance of a Discord client
const client = new Discord.Client();
// Define your bot's token here
const token = 'bottoken';
// Set up an event listener for when the bot is ready
client.once('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
// Set up an event listener for incoming messages
client.on('messageCreate', async message => {
// Ignore messages from bots
if (message.author.bot) return;
// Create a new embedded message
const embed = new MessageEmbed()
.setColor('#0099ff') // Set the color of the embed
.setTitle('Example Embed') // Set the title of the embed
.setDescription('This is an example of an embedded message.') // Set the description of the embed
.setImage('https://example.com/image.png') // Set an image for the embed
.setTimestamp(); // Add a timestamp to the embed
// Send the embedded message to the same channel
message.channel.send(embed);
});
// Log in to Discord with your app's token
client.login(token);