first commit

This commit is contained in:
Marius Begby committed 2023-07-04 15:02:58 +02:00
commit 4eaea3a858
7 files changed
+1472

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
const Discord = require('discord.js');
const { Player } = require('discord-player');
const { token } = require('./config.json');
// Setup required permissions for the bot to work
const client = new Discord.Client({
intents: [
Discord.GatewayIntentBits.Guilds,
Discord.GatewayIntentBits.GuildMessages,
Discord.GatewayIntentBits.GuildVoiceStates,
Discord.GatewayIntentBits.GuildMessageReactions
]
});
// Log to console when successfully logged in
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
// this is the entrypoint for discord-player based application
const player = new Player(client);
// This method will load all the extractors from the @discord-player/extractor package
await player.extractors.loadDefault();
client.login(token);