diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2022-12-18 22:31:04 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2022-12-18 22:36:32 -0500 |
| commit | c55e480e4d8dbf9d3c11cb7a13c69f9f1ab730db (patch) | |
| tree | 848c4cdc3e1efb003cc7dacf3f3670ae62562fa0 /bot.js | |
| parent | 4c25284974a1575b942e3d07bf00afa2614cd376 (diff) | |
| download | DLAP-c55e480e4d8dbf9d3c11cb7a13c69f9f1ab730db.tar.gz DLAP-c55e480e4d8dbf9d3c11cb7a13c69f9f1ab730db.tar.bz2 DLAP-c55e480e4d8dbf9d3c11cb7a13c69f9f1ab730db.zip | |
Improved list command; Directory name change; Fixed ActivityType
Diffstat (limited to 'bot.js')
| -rw-r--r-- | bot.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -19,10 +19,10 @@ * ***************************************************************************/ import { Client, GatewayIntentBits, EmbedBuilder, Collection, version, InteractionType } from 'discord.js'; -import { voiceInit } from './backend/VoiceInitialization.js'; +import { voiceInit } from './AudioBackend/VoiceInitialization.js'; import { readdirSync, readFileSync } from 'node:fs'; // import config from './config.json' assert { type: 'json' } Not supported by ESLint yet -const { token, statusChannel, voiceChannel, shuffle, repeat, presenceActivity } = JSON.parse(readFileSync('./config.json', 'utf-8')); +const { token, statusChannel, voiceChannel, shuffle, repeat, presenceActivity, activityType } = JSON.parse(readFileSync('./config.json', 'utf-8')); const bot = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates] }); bot.login(token); @@ -34,10 +34,10 @@ bot.login(token); // Slash Command Handler bot.commands = new Collection(); -const commandFiles = readdirSync('./commands').filter(file => file.endsWith('.js')); +const commandFiles = readdirSync('./Commands').filter(file => file.endsWith('.js')); for (const file of commandFiles) { - const { default: command } = await import(`./commands/${file}`); + const { default: command } = await import(`./Commands/${file}`); bot.commands.set(command.data.name, command); } @@ -54,7 +54,7 @@ bot.once('ready', async() => { bot.user.setPresence({ activities: [{ name: presenceActivity, - type: 'LISTENING' + type: activityType }], status: 'online' }); |
