-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
27 lines (21 loc) · 781 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const { Player } = require('discord-player');
const { Client, GatewayIntentBits } = require('discord.js');
const { YoutubeiExtractor } = require('discord-player-youtubei');
global.client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildVoiceStates,
],
disableMentions: 'everyone',
});
client.config = require('./config');
require("dotenv").config();
const player = new Player(client, client.config.opt.discordPlayer);
player.extractors.register(YoutubeiExtractor, {
authentication: process.env.YTtoken
});
player.extractors.loadDefault((ext) => !['YouTubeExtractor'].includes(ext));
require('./loader');
client.login(process.env.token);