mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-16 20:00:59 -05:00
Compare commits
6 Commits
6d5915fd30
...
d042bff384
Author | SHA1 | Date | |
---|---|---|---|
|
d042bff384 | ||
|
b9bcede3ea | ||
|
8363213d69 | ||
|
f88e4b33e6 | ||
|
0baf2602ed | ||
|
aca335dbd4 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,7 +1,6 @@
|
||||
.vscode
|
||||
# NodeJS stuff
|
||||
node_modules/
|
||||
package-lock.json
|
||||
.ncurc.json
|
||||
# Bot stuff
|
||||
dist/
|
||||
|
2167
package-lock.json
generated
Normal file
2167
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -31,10 +31,10 @@
|
||||
"@discordjs/opus": "0.9.0",
|
||||
"discord-player": "6.6.0",
|
||||
"discord.js": "14.11.0",
|
||||
"ytdl-core": "4.11.4",
|
||||
"ytdl-core": "4.11.5",
|
||||
"moment": "2.29.4",
|
||||
"ms": "2.1.3",
|
||||
"mongoose": "7.3.1",
|
||||
"mongoose": "7.3.3",
|
||||
"systeminformation": "5.18.6",
|
||||
"@octokit/rest": "19.0.13",
|
||||
"@octokit/auth-token": "4.0.0",
|
||||
|
@ -30,7 +30,8 @@ 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/`');
|
||||
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.`)
|
||||
player.play(interaction.member.voice.channel, url);
|
||||
await interaction.reply(`Added the ${url.includes('playlist/') ? 'playlist' : 'song'} to the queue.`);
|
||||
},
|
||||
@ -55,7 +56,7 @@ export default {
|
||||
},
|
||||
queue: async()=>{
|
||||
const queue = useQueue(interaction.guildId);
|
||||
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.'))
|
||||
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.*')]})
|
||||
},
|
||||
volume: ()=>{
|
||||
const vol = interaction.options.getNumber('percentage');
|
||||
@ -69,6 +70,10 @@ 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()]();
|
||||
},
|
||||
@ -85,6 +90,9 @@ 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'))
|
||||
|
Loading…
Reference in New Issue
Block a user