1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -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 .vscode
# NodeJS stuff # NodeJS stuff
node_modules/ node_modules/
package-lock.json
.ncurc.json .ncurc.json
# Bot stuff # Bot stuff
dist/ 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", "@discordjs/opus": "0.9.0",
"discord-player": "6.6.0", "discord-player": "6.6.0",
"discord.js": "14.11.0", "discord.js": "14.11.0",
"ytdl-core": "4.11.5", "ytdl-core": "4.11.4",
"moment": "2.29.4", "moment": "2.29.4",
"ms": "2.1.3", "ms": "2.1.3",
"mongoose": "7.3.3", "mongoose": "7.3.1",
"systeminformation": "5.18.6", "systeminformation": "5.18.6",
"@octokit/rest": "19.0.13", "@octokit/rest": "19.0.13",
"@octokit/auth-token": "4.0.0", "@octokit/auth-token": "4.0.0",

View File

@ -30,8 +30,7 @@ export default {
({ ({
play: async()=>{ play: async()=>{
const url = interaction.options.getString('url'); 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 (!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/`');
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.`)
player.play(interaction.member.voice.channel, url); player.play(interaction.member.voice.channel, url);
await interaction.reply(`Added the ${url.includes('playlist/') ? 'playlist' : 'song'} to the queue.`); await interaction.reply(`Added the ${url.includes('playlist/') ? 'playlist' : 'song'} to the queue.`);
}, },
@ -56,7 +55,7 @@ export default {
}, },
queue: async()=>{ queue: async()=>{
const queue = useQueue(interaction.guildId); 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: ()=>{ volume: ()=>{
const vol = interaction.options.getNumber('percentage'); const vol = interaction.options.getNumber('percentage');
@ -70,10 +69,6 @@ export default {
remove: ()=>{ remove: ()=>{
useQueue(interaction.guildId).removeTrack(interaction.options.getNumber('id',true)); useQueue(interaction.guildId).removeTrack(interaction.options.getNumber('id',true));
interaction.reply('Song has been removed from the queue.') 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()](); } as any)[interaction.options.getSubcommand()]();
}, },
@ -90,9 +85,6 @@ export default {
.addSubcommand(x=>x .addSubcommand(x=>x
.setName('stop') .setName('stop')
.setDescription('Stop playing music and disconnect the bot from voice channel')) .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 .addSubcommand(x=>x
.setName('pause') .setName('pause')
.setDescription('Pause/unpause the music')) .setDescription('Pause/unpause the music'))