mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 23:36:35 +02:00
18 lines
479 B
JavaScript
18 lines
479 B
JavaScript
require('dotenv').config();
|
|
const { Client, IntentsBitField, Collection } = require("discord.js");
|
|
|
|
const client = new Client({intents: new IntentsBitField(3276799)});
|
|
|
|
client.on('ready', () => {
|
|
console.log(`Logged in as ${client.user.tag}!`);
|
|
});
|
|
|
|
client.on('interactionCreate', async interaction => {
|
|
if (!interaction.isChatInputCommand()) return;
|
|
|
|
if (interaction.commandName === 'ping') {
|
|
await interaction.reply('Pong!');
|
|
}
|
|
});
|
|
|
|
client.login(process.env.TOKEN); |