// create a new Client instance
const discord_client = new Client({
intents: [
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageTyping,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageTyping,
GatewayIntentBits.MessageContent,
],
partials: [
Partials.Message,
Partials.Channel,
]
});
// listen for the client to be ready
discord_client.once(Events.ClientReady, (c) => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});
// listen for general chat and respond
discord_client.on(Events.MessageCreate, async interaction => {
console.log(`Responding to chat in ${interaction.channelId}`);
});
// create a new Client instance
const discord_client = new Client({
intents: [
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageTyping,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageTyping,
GatewayIntentBits.MessageContent,
],
partials: [
Partials.Message,
Partials.Channel,
]
});
// listen for the client to be ready
discord_client.once(Events.ClientReady, (c) => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});
// listen for general chat and respond
discord_client.on(Events.MessageCreate, async interaction => {
console.log(`Responding to chat in ${interaction.channelId}`);
});