Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/commands/replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ export default class implements Command {
throw new Error('can\'t replay a livestream');
}

await Promise.all([
player.seek(0),
interaction.deferReply(),
]);
await interaction.deferReply();
await player.seek(0);

await interaction.editReply('👍 replayed the current song');
}
Expand Down
3 changes: 2 additions & 1 deletion src/commands/resume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ export default class implements Command {
throw new Error('nothing to play');
}

await interaction.deferReply();
await player.connect(targetVoiceChannel);
await player.play();

await interaction.reply({
await interaction.editReply({
content: 'the stop-and-go light is now green',
embeds: [buildPlayingMessageEmbed(player)],
});
Expand Down
6 changes: 2 additions & 4 deletions src/commands/seek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ export default class implements Command {
throw new Error('can\'t seek past the end of the song');
}

await Promise.all([
player.seek(seekTime),
interaction.deferReply(),
]);
await interaction.deferReply();
await player.seek(seekTime);

await interaction.editReply(`👍 seeked to ${prettyTime(player.getPosition())}`);
}
Expand Down
3 changes: 2 additions & 1 deletion src/commands/skip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ export default class implements Command {
const player = this.playerManager.get(interaction.guild!.id);

try {
await interaction.deferReply();
await player.forward(numToSkip);
await interaction.reply({
await interaction.editReply({
content: 'keep \'er movin\'',
embeds: player.getCurrent() ? [buildPlayingMessageEmbed(player)] : [],
});
Expand Down
3 changes: 2 additions & 1 deletion src/commands/unskip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export default class implements Command {
const player = this.playerManager.get(interaction.guild!.id);

try {
await interaction.deferReply();
await player.back();
await interaction.reply({
await interaction.editReply({
content: 'back \'er up\'',
embeds: player.getCurrent() ? [buildPlayingMessageEmbed(player)] : [],
});
Expand Down