diff --git a/src/classes/interactions.ts b/src/classes/interactions.ts index c4a96d7..fae28d2 100644 --- a/src/classes/interactions.ts +++ b/src/classes/interactions.ts @@ -162,9 +162,9 @@ abstract class BaseInteractionWithEmbedResponse extends BaseInteraction { super(); } - protected async getEmbedUserAuthor( + protected getEmbedUserAuthor( interaction: MessageComponentInteraction | ChatInputCommandInteraction - ): Promise { + ): EmbedAuthorOptions { let authorName: string = ''; if (interaction.member instanceof GuildMember) { authorName = interaction.member.nickname || interaction.user.username; @@ -178,10 +178,10 @@ abstract class BaseInteractionWithEmbedResponse extends BaseInteraction { }; } - protected async getEmbedQueueAuthor( + protected getEmbedQueueAuthor( interaction: MessageComponentInteraction | ChatInputCommandInteraction, queue: GuildQueue - ): Promise { + ): EmbedAuthorOptions { return { name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`, iconURL: interaction.guild!.iconURL() || this.embedOptions.info.fallbackIconUrl diff --git a/src/interactions/commands/player/filters.ts b/src/interactions/commands/player/filters.ts index c82a0e2..92e42ca 100644 --- a/src/interactions/commands/player/filters.ts +++ b/src/interactions/commands/player/filters.ts @@ -144,7 +144,7 @@ class FiltersCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.` ) diff --git a/src/interactions/commands/player/leave.ts b/src/interactions/commands/player/leave.ts index 4073e89..f0a2813 100644 --- a/src/interactions/commands/player/leave.ts +++ b/src/interactions/commands/player/leave.ts @@ -32,7 +32,7 @@ class LeaveCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.success} Leaving channel**\nCleared the track queue and left voice channel.\n\nTo play more music, use the **\`/play\`** command!` ) diff --git a/src/interactions/commands/player/loop.ts b/src/interactions/commands/player/loop.ts index d7d0feb..fe4762f 100644 --- a/src/interactions/commands/player/loop.ts +++ b/src/interactions/commands/player/loop.ts @@ -117,7 +117,7 @@ class LoopCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription(getChangedRepeatModeEmbedReply) .setColor(this.embedOptions.colors.success) ] diff --git a/src/interactions/commands/player/nowplaying.ts b/src/interactions/commands/player/nowplaying.ts index 280d4ad..322a92d 100644 --- a/src/interactions/commands/player/nowplaying.ts +++ b/src/interactions/commands/player/nowplaying.ts @@ -63,7 +63,7 @@ class NowPlayingCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedQueueAuthor(interaction, queue)) + .setAuthor(this.getEmbedQueueAuthor(interaction, queue)) .setDescription( `${displayTrackPlayingStatus}\n` + `${displayTrackUrl}\n` + diff --git a/src/interactions/commands/player/pause.ts b/src/interactions/commands/player/pause.ts index 1b5132b..6eed373 100644 --- a/src/interactions/commands/player/pause.ts +++ b/src/interactions/commands/player/pause.ts @@ -33,7 +33,7 @@ class PauseCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.pauseResumed} ${ queue.node.isPaused() ? 'Paused Track' : 'Resumed track' diff --git a/src/interactions/commands/player/play.ts b/src/interactions/commands/player/play.ts index e00b96c..0ff3b1c 100644 --- a/src/interactions/commands/player/play.ts +++ b/src/interactions/commands/player/play.ts @@ -165,7 +165,7 @@ class PlayCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription(message) .setThumbnail(this.getTrackThumbnailUrl(track)) .setColor(this.embedOptions.colors.success) diff --git a/src/interactions/commands/player/queue.ts b/src/interactions/commands/player/queue.ts index 5ecdb75..6ea4c5d 100644 --- a/src/interactions/commands/player/queue.ts +++ b/src/interactions/commands/player/queue.ts @@ -59,7 +59,7 @@ class QueueCommand extends BaseSlashCommandInteraction { await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedQueueAuthor(interaction, queue)) + .setAuthor(this.getEmbedQueueAuthor(interaction, queue)) .setDescription( `**${this.embedOptions.icons.audioPlaying} Now playing**\n` + `${this.getFormattedTrackUrl(currentTrack)}\n` + @@ -89,7 +89,7 @@ class QueueCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedQueueAuthor(interaction, queue)) + .setAuthor(this.getEmbedQueueAuthor(interaction, queue)) .setDescription( `${this.getDisplayRepeatMode(queue.repeatMode)}` + `**${this.embedOptions.icons.queue} Tracks in queue**\n` + diff --git a/src/interactions/commands/player/remove.ts b/src/interactions/commands/player/remove.ts index 85d462f..0dbf53d 100644 --- a/src/interactions/commands/player/remove.ts +++ b/src/interactions/commands/player/remove.ts @@ -76,7 +76,7 @@ class RemoveCommand extends BaseSlashCommandInteraction { await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.success} Removed track**\n${this.getDisplayTrackDurationAndUrl( removedTrack diff --git a/src/interactions/commands/player/seek.ts b/src/interactions/commands/player/seek.ts index 90cc01c..a9b078c 100644 --- a/src/interactions/commands/player/seek.ts +++ b/src/interactions/commands/player/seek.ts @@ -143,7 +143,7 @@ class SeekCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.success} Seeking to duration**\nSeeking to **\`${durationString}\`** in current track.` ) diff --git a/src/interactions/commands/player/shuffle.ts b/src/interactions/commands/player/shuffle.ts index affb0f6..f0c21ab 100644 --- a/src/interactions/commands/player/shuffle.ts +++ b/src/interactions/commands/player/shuffle.ts @@ -33,7 +33,7 @@ class ShuffleCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.shuffled} Shuffled queue tracks**\nThe **${queue.tracks.data.length}** tracks in the queue has been shuffled.\n\nView the new queue order with **\`/queue\`**.` ) diff --git a/src/interactions/commands/player/skip.ts b/src/interactions/commands/player/skip.ts index 81b21c0..34c50d8 100644 --- a/src/interactions/commands/player/skip.ts +++ b/src/interactions/commands/player/skip.ts @@ -56,7 +56,7 @@ class SkipCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${ this.embedOptions.icons.skipped @@ -108,7 +108,7 @@ class SkipCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.skipped} Skipped track**\n${this.getDisplayTrackDurationAndUrl( skippedTrack diff --git a/src/interactions/commands/player/stop.ts b/src/interactions/commands/player/stop.ts index 64706ef..bf3d1dd 100644 --- a/src/interactions/commands/player/stop.ts +++ b/src/interactions/commands/player/stop.ts @@ -36,7 +36,7 @@ class StopCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.success} Stopped playing**\nStopped playing audio and cleared the track queue.\n\nTo play more music, use the **\`/play\`** command!` ) diff --git a/src/interactions/commands/player/volume.ts b/src/interactions/commands/player/volume.ts index 27beb90..b12a48b 100644 --- a/src/interactions/commands/player/volume.ts +++ b/src/interactions/commands/player/volume.ts @@ -75,7 +75,7 @@ class VolumeCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.volumeMuted} Audio muted**\nPlayback audio has been muted, because volume was set to **\`${volume}%\`**.` ) @@ -88,7 +88,7 @@ class VolumeCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.volumeChanged} Volume changed**\nPlayback volume has been changed to **\`${volume}%\`**.` ) diff --git a/src/interactions/components/filters-disable-button.ts b/src/interactions/components/filters-disable-button.ts index 8502645..a633e6b 100644 --- a/src/interactions/components/filters-disable-button.ts +++ b/src/interactions/components/filters-disable-button.ts @@ -32,7 +32,7 @@ class FiltersDisableButtonComponent extends BaseComponentInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.` ) diff --git a/src/interactions/components/filters-select-menu.ts b/src/interactions/components/filters-select-menu.ts index 0f4850c..63b876d 100644 --- a/src/interactions/components/filters-select-menu.ts +++ b/src/interactions/components/filters-select-menu.ts @@ -65,7 +65,7 @@ class FiltersSelectMenuComponent extends BaseComponentInteraction { return await selectMenuInteraction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${ this.embedOptions.icons.success diff --git a/src/interactions/components/nowplaying-skip-button.ts b/src/interactions/components/nowplaying-skip-button.ts index f64fd7f..1db4390 100644 --- a/src/interactions/components/nowplaying-skip-button.ts +++ b/src/interactions/components/nowplaying-skip-button.ts @@ -87,7 +87,7 @@ class NowplayingSkipButton extends BaseComponentInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setAuthor(await this.getEmbedUserAuthor(interaction)) + .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( `**${this.embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${ skippedTrack.title