1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 00:10:58 -05:00

Compare commits

..

No commits in common. "d042bff384e321a74706c03f5b6fcd222a988adf" and "6d5915fd30aee8e5aa8f1c1ec2e43b908f94d260" have entirely different histories.

4 changed files with 5 additions and 2179 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
.vscode
# NodeJS stuff
node_modules/
package-lock.json
.ncurc.json
# Bot stuff
dist/

2167
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,10 +31,10 @@
"@discordjs/opus": "0.9.0",
"discord-player": "6.6.0",
"discord.js": "14.11.0",
"ytdl-core": "4.11.5",
"ytdl-core": "4.11.4",
"moment": "2.29.4",
"ms": "2.1.3",
"mongoose": "7.3.3",
"mongoose": "7.3.1",
"systeminformation": "5.18.6",
"@octokit/rest": "19.0.13",
"@octokit/auth-token": "4.0.0",

View File

@ -30,8 +30,7 @@ export default {
({
play: async()=>{
const url = interaction.options.getString('url');
if (!url.includes('https://open.spotify.com/')) return interaction.reply('Sorry, I can\'t play that. I can only accept Spotify links that contains `https://open.spotify.com/`'); // Yes, I made it clear that it's intended typo.
if (!(await player.search(url,{requestedBy:interaction.user})).hasTracks()) return interaction.reply(`No results found for \`${url}\`\nIt is either private, unavailable or you made a *tpyo* in your query.`)
if (!url.includes('https://open.spotify.com/')) return interaction.reply('Sorry, I can\'t play that. I can only accept Spotify links that contains `https://open.spotify.com/`');
player.play(interaction.member.voice.channel, url);
await interaction.reply(`Added the ${url.includes('playlist/') ? 'playlist' : 'song'} to the queue.`);
},
@ -56,7 +55,7 @@ export default {
},
queue: async()=>{
const queue = useQueue(interaction.guildId);
interaction.reply({embeds:[new client.embed().setColor(client.config.embedColor).setTitle(`Songs currently in the queue: ${queue.tracks.size}`).setDescription(queue.tracks.size > 0 ? `\`\`\`${queue.tracks.map(i=>`${i.title} - ${i.author}\`\`\``).join('```\n')}`.slice(0,1017) : '*No songs currently queued.*')]})
await interaction.reply({embeds:[new client.embed().setColor(client.config.embedColor).setTitle(`Songs currently in the queue: ${queue.tracks.size}`).setDescription(queue.tracks.size > 0 ? `${queue.tracks.map(i=>`**${i.title}** - **${i.author}**`).join('\n')}` : '*No songs currently queued.*')]}).catch(()=>interaction.channel.send('I cannot send an embed that hits beyond the character limit.'))
},
volume: ()=>{
const vol = interaction.options.getNumber('percentage');
@ -70,10 +69,6 @@ export default {
remove: ()=>{
useQueue(interaction.guildId).removeTrack(interaction.options.getNumber('id',true));
interaction.reply('Song has been removed from the queue.')
},
skip: ()=>{
useQueue(interaction.guildId).node.skip();
interaction.reply('Skipped the current song, now playing the next one in queue.')
}
} as any)[interaction.options.getSubcommand()]();
},
@ -90,9 +85,6 @@ export default {
.addSubcommand(x=>x
.setName('stop')
.setDescription('Stop playing music and disconnect the bot from voice channel'))
.addSubcommand(x=>x
.setName('skip')
.setDescription('Skip the current song and play the next one'))
.addSubcommand(x=>x
.setName('pause')
.setDescription('Pause/unpause the music'))