import { Client, Events, GatewayIntentBits } from 'discord.js';
import 'dotenv/config';
const client = new Client({
verbose: true,
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMessagePolls,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildModeration,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.DirectMessages
]
});
client.on(Events.ClientReady, readyClient => {
console.log(`Logged in as ${readyClient.user.tag}!`);
});
client.on(Events.MessageCreate, async (message) => {
console.log(message);
});
client.on(Events.InteractionCreate, async (interaction) => {
console.log(interaction);
});
client.login(process.env.TOKEN);
import { Client, Events, GatewayIntentBits } from 'discord.js';
import 'dotenv/config';
const client = new Client({
verbose: true,
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMessagePolls,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildModeration,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.DirectMessages
]
});
client.on(Events.ClientReady, readyClient => {
console.log(`Logged in as ${readyClient.user.tag}!`);
});
client.on(Events.MessageCreate, async (message) => {
console.log(message);
});
client.on(Events.InteractionCreate, async (interaction) => {
console.log(interaction);
});
client.login(process.env.TOKEN);