mirror of
https://github.com/Alee14/DLAP.git
synced 2025-01-22 10:52:03 -05:00
Fixed about; No longer requiring guild id for deploy command
This commit is contained in:
parent
6feb5b84b2
commit
dc1961d224
4 changed files with 8 additions and 9 deletions
|
@ -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"
|
||||
}
|
||||
```
|
||||
|
|
|
@ -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] });
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue