Skip to content

Commit

Permalink
changed message send to await fun
Browse files Browse the repository at this point in the history
  • Loading branch information
k4mien committed Jan 24, 2024
1 parent 5b52e4f commit 3430156
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/commands/clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = {

if (player.queue.tracks.length) {
await player.queue.splice(0, player.queue.tracks.length)
return message.channel.send({
await message.channel.send({
embeds: [
new EmbedBuilder()
.setColor('Purple')
Expand Down
2 changes: 1 addition & 1 deletion src/commands/join.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {
applyVolumeAsFilter: false
})
await newPlayer.connect()
return message.channel.send({
await message.channel.send({
embeds: [
new EmbedBuilder().setColor('Purple').setDescription(`Joined ${voiceChannel}!`)
]
Expand Down
8 changes: 4 additions & 4 deletions src/commands/loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ module.exports = {
})
}

if (!player) {
if (!player) {
return message.channel.send({
embeds: [
new EmbedBuilder()
.setColor('Purple')
.setDescription('Bot is not connected!')
]
})
})
}

if (player?.voiceChannelId !== voiceChannelId) {
Expand All @@ -42,14 +42,14 @@ module.exports = {
})
}

if ((!player.playing && !player.paused) || !player.queue.current) {
if ((!player.playing && !player.paused) || !player.queue.current) {
return message.channel.send({
embeds: [
new EmbedBuilder()
.setColor('Purple')
.setDescription('There is nothing in the queue right now!')
]
})
})
}

if (!args[0]) {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {
})
} else {
await player.pause()
return message.channel.send({
await message.channel.send({
embeds: [
new EmbedBuilder()
.setColor('Purple')
Expand Down
2 changes: 1 addition & 1 deletion src/commands/resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {
})
} else {
await player.resume()
return message.channel.send({
await message.channel.send({
embeds: [
new EmbedBuilder()
.setColor('Purple')
Expand Down
3 changes: 1 addition & 2 deletions src/commands/skip.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ module.exports = {
}

if (!player.queue.tracks.length) {
// await player.play({encodedTrack: null});
await player.stopPlaying()
} else {
await player.skip()
return message.channel.send({
await message.channel.send({
embeds: [
new EmbedBuilder().setColor('Purple').setDescription(':track_next: Song skipped!')
]
Expand Down
9 changes: 4 additions & 5 deletions src/commands/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ module.exports = {
})
}

if (!player) {
if (!player) {
return message.channel.send({
embeds: [
new EmbedBuilder()
.setColor('Purple')
.setDescription('Bot is not connected!')
]
})
})
}

if (player?.voiceChannelId !== voiceChannelId) {
Expand All @@ -42,14 +42,14 @@ module.exports = {
})
}

if ((!player.playing && !player.paused) || !player.queue.current) {
if ((!player.playing && !player.paused) || !player.queue.current) {
return message.channel.send({
embeds: [
new EmbedBuilder()
.setColor('Purple')
.setDescription('There is nothing in the queue right now!')
]
})
})
}

if (!args[0]) {
Expand Down Expand Up @@ -85,7 +85,6 @@ module.exports = {
}

if (!player.queue.tracks.length) {
// await player.play({encodedTrack: null});
await player.stopPlaying()
} else {
await message.channel.send({
Expand Down

0 comments on commit 3430156

Please sign in to comment.