mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
first commit
This commit is contained in:
commit
4eaea3a858
7 files changed
+1472
No files matched your search
@@ -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);
|
||||
Reference in new issue
Block a user