added MemberJoin

This commit is contained in:
DeSqBlocki
2024-08-06 11:54:27 +02:00
parent 9dac81db9b
commit d7c3bdb5f7
12 changed files with 794 additions and 1208 deletions
+3 -15
View File
@@ -1,7 +1,5 @@
const { Client, GatewayIntentBits, Collection, Partials } = require('discord.js')
const { MongoClient } = require('mongodb')
const { DisTube } = require('distube');
const { YtDlpPlugin } = require('@distube/yt-dlp')
require('dotenv').config()
const mClient = new MongoClient(process.env.M_URI)
exports.mClient = mClient;
@@ -9,7 +7,8 @@ const fs = require('node:fs')
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMessageReactions,
@@ -27,19 +26,8 @@ client.aliases = new Collection() // list of command aliases
client.buttons = new Collection() // list of buttons
client.selectMenus = new Collection() // list of selectMenus
// Initialize DisTube with YtDlpPlugin and request options
const distube = new DisTube(client, {
plugins: [
new YtDlpPlugin(),
],
});
client.distube = distube
fs.readdirSync('./handlers').forEach((handler) => {
require(`./handlers/${handler}`)(client)
});
distube.on('error', (channel, error) => {client.emit('DistubeError', (channel, error))})
client.login(process.env.D_Token)
client.login(process.env.D_Token)