diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2022-07-12 19:49:42 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2022-07-12 19:49:42 -0400 |
| commit | dc1961d2247bdbbcad8dfa720e3a46e004e0262d (patch) | |
| tree | d2ac60a9c2af9edab3eef38635d01bbdf077753c | |
| parent | 6feb5b84b217984a98827d3008ac598ba46061a0 (diff) | |
| download | DLAP-dc1961d2247bdbbcad8dfa720e3a46e004e0262d.tar.gz DLAP-dc1961d2247bdbbcad8dfa720e3a46e004e0262d.tar.bz2 DLAP-dc1961d2247bdbbcad8dfa720e3a46e004e0262d.zip | |
Fixed about; No longer requiring guild id for deploy command
| -rw-r--r-- | AudioBackend.js | 6 | ||||
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | commands/about.js | 2 | ||||
| -rw-r--r-- | deploy-command.js | 6 |
4 files changed, 8 insertions, 9 deletions
diff --git a/AudioBackend.js b/AudioBackend.js index 5948789..43e7b2f 100644 --- a/AudioBackend.js +++ b/AudioBackend.js @@ -63,7 +63,7 @@ export async function voiceInit(bot) { }); player.on('idle', () => { - console.log('Beat has finished playing, now to the next beat...'); + console.log('Beat has finished playing, now playing next beat...'); nextAudio(bot); }); @@ -88,10 +88,10 @@ export async function orderPlaylist(bot) { export async function shufflePlaylist(bot) { console.log('Shuffling beats...'); - currentTrack = 0; shuffleArray(files); - console.log(files); console.log('Playing beats by shuffle...'); + currentTrack = 0; + console.log(files); audio = files[currentTrack]; return await playAudio(bot); } @@ -18,8 +18,7 @@ Make a new file called `config.json`. "txtFile": true/false, "shuffle": true/false, "statusChannel": "channel_id", - "voiceChannel": "voice_channel_id" - "guildID": "guild_id", + "voiceChannel": "voice_channel_id", "clientID": "client_id" } ``` diff --git a/commands/about.js b/commands/about.js index e87f1a6..04d6b75 100644 --- a/commands/about.js +++ b/commands/about.js @@ -47,7 +47,7 @@ export default { new MessageButton() .setStyle('LINK') .setLabel('Original Source Code') - .setURL('https://github.com/Alee14/DLMP3') + .setURL('https://github.com/Alee14/DLAP') ); return await interaction.reply({ embeds: [aboutEmbed], components: [srcOrig] }); diff --git a/deploy-command.js b/deploy-command.js index f04872e..cd698ee 100644 --- a/deploy-command.js +++ b/deploy-command.js @@ -2,7 +2,7 @@ import fs, { readFileSync } from 'node:fs'; import { REST } from '@discordjs/rest'; import { Routes } from 'discord-api-types/v10'; // import config from './config.json' assert {type: 'json'} -const config = JSON.parse(readFileSync('./config.json')); +const { clientID, token } = JSON.parse(readFileSync('./config.json')); const commands = []; const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); @@ -12,8 +12,8 @@ for (const file of commandFiles) { commands.push(command.data.toJSON()); } -const rest = new REST({ version: '10' }).setToken(config.token); +const rest = new REST({ version: '10' }).setToken(token); -rest.put(Routes.applicationGuildCommands(config.clientID, config.guildID), { body: commands }) +rest.put(Routes.applicationCommands(clientID), { body: commands }) .then(() => console.log('Successfully registered application commands.')) .catch(console.error); |
