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

Compare commits

...

6 Commits

Author SHA1 Message Date
AnxietyisReal
d042bff384 Improved music function a bit better. 2023-07-19 19:13:59 +10:00
AnxietyisReal
b9bcede3ea Add skip command to music player 2023-07-19 18:25:42 +10:00
Toast
8363213d69 Update YTDL Core 2023-07-19 18:10:28 +10:00
dependabot[bot]
f88e4b33e6
Bump mongoose from 7.3.1 to 7.3.3 (#2)
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.3.1 to 7.3.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.3.1...7.3.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 18:02:18 +10:00
dependabot[bot]
0baf2602ed
Bump semver from 6.3.0 to 6.3.1 (#1)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 18:02:00 +10:00
AnxietyisReal
aca335dbd4 Add lockfile to repo for Dependabot to work. 2023-07-19 17:50:02 +10:00
4 changed files with 2179 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
.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 Normal file

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.4", "ytdl-core": "4.11.5",
"moment": "2.29.4", "moment": "2.29.4",
"ms": "2.1.3", "ms": "2.1.3",
"mongoose": "7.3.1", "mongoose": "7.3.3",
"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,7 +30,8 @@ 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/`'); 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); 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.`);
}, },
@ -55,7 +56,7 @@ export default {
}, },
queue: async()=>{ queue: async()=>{
const queue = useQueue(interaction.guildId); 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: ()=>{ volume: ()=>{
const vol = interaction.options.getNumber('percentage'); const vol = interaction.options.getNumber('percentage');
@ -69,6 +70,10 @@ 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()]();
}, },
@ -85,6 +90,9 @@ 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'))