From e57dcaf399affd40d3ef28717a3b52b8ea6bc9df Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Wed, 13 Sep 2023 20:12:13 +0200 Subject: [PATCH] chore: formatting strings to multiple lines --- src/interactions/commands/player/filters.ts | 10 +++++++--- src/interactions/commands/player/leave.ts | 4 +++- src/interactions/commands/player/loop.ts | 6 ++++-- src/interactions/commands/player/lyrics.ts | 12 +++++++++--- src/interactions/commands/player/nowplaying.ts | 5 ++++- src/interactions/commands/player/remove.ts | 4 +++- src/interactions/commands/player/shuffle.ts | 4 +++- src/interactions/commands/player/stop.ts | 4 +++- 8 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/interactions/commands/player/filters.ts b/src/interactions/commands/player/filters.ts index 92e42ca..2d88a2e 100644 --- a/src/interactions/commands/player/filters.ts +++ b/src/interactions/commands/player/filters.ts @@ -127,7 +127,9 @@ class FiltersCommand extends BaseSlashCommandInteraction { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setDescription('**Toggle filters**\nEnable or disable audio filters for playback from the menu.') + .setDescription( + '**Toggle filters**\n' + 'Enable or disable audio filters for playback from the menu.' + ) .setColor(this.embedOptions.colors.info) ], components: [filterActionRow, disableFiltersActionRow] @@ -146,7 +148,8 @@ class FiltersCommand extends BaseSlashCommandInteraction { new EmbedBuilder() .setAuthor(this.getEmbedUserAuthor(interaction)) .setDescription( - `**${this.embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.` + `**${this.embedOptions.icons.success} Disabled filters**\n` + + 'All audio filters have been disabled.' ) .setColor(this.embedOptions.colors.success) ], @@ -160,7 +163,8 @@ class FiltersCommand extends BaseSlashCommandInteraction { embeds: [ new EmbedBuilder() .setDescription( - `**${this.embedOptions.icons.bot} Coming soon**\nThis functionality has not yet been implemented, and will be available soon.` + `**${this.embedOptions.icons.bot} Coming soon**\n` + + 'This functionality has not yet been implemented, and will be available soon.' ) .setColor(this.embedOptions.colors.info) ], diff --git a/src/interactions/commands/player/leave.ts b/src/interactions/commands/player/leave.ts index f0a2813..961145b 100644 --- a/src/interactions/commands/player/leave.ts +++ b/src/interactions/commands/player/leave.ts @@ -34,7 +34,9 @@ class LeaveCommand extends BaseSlashCommandInteraction { new EmbedBuilder() .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!` + `**${this.embedOptions.icons.success} Leaving channel**\n` + + 'Cleared the track queue and left voice channel.\n\n' + + 'To play more music, use the **`/play`** command!' ) .setColor(this.embedOptions.colors.success) ] diff --git a/src/interactions/commands/player/loop.ts b/src/interactions/commands/player/loop.ts index fe4762f..8aee213 100644 --- a/src/interactions/commands/player/loop.ts +++ b/src/interactions/commands/player/loop.ts @@ -74,7 +74,8 @@ class LoopCommand extends BaseSlashCommandInteraction { embeds: [ new EmbedBuilder() .setDescription( - `**${repeatModeEmbedIcon} Current loop mode**\nThe looping mode is currently set to **\`${repeatModeEmbedName}\`**.` + `**${repeatModeEmbedIcon} Current loop mode**\n` + + `The looping mode is currently set to **\`${repeatModeEmbedName}\`**.` ) .setColor(this.embedOptions.colors.info) ] @@ -93,7 +94,8 @@ class LoopCommand extends BaseSlashCommandInteraction { embeds: [ new EmbedBuilder() .setDescription( - `**${this.embedOptions.icons.warning} Oops!**\nLoop mode is already **\`${repeatModeEmbedName}\`**.` + `**${this.embedOptions.icons.warning} Oops!**\n` + + `Loop mode is already **\`${repeatModeEmbedName}\`**.` ) .setColor(this.embedOptions.colors.warning) ] diff --git a/src/interactions/commands/player/lyrics.ts b/src/interactions/commands/player/lyrics.ts index d2990ad..bc54fe6 100644 --- a/src/interactions/commands/player/lyrics.ts +++ b/src/interactions/commands/player/lyrics.ts @@ -166,7 +166,8 @@ class LyricsCommand extends BaseSlashCommandInteraction { embeds: [ new EmbedBuilder() .setDescription( - `**${this.embedOptions.icons.warning} No lyrics found**\nThere was no Genius lyrics found for track **${geniusSearchQuery}**.` + `**${this.embedOptions.icons.warning} No lyrics found**\n` + + `There was no Genius lyrics found for track **${geniusSearchQuery}**.` ) .setColor(this.embedOptions.colors.warning) ] @@ -184,7 +185,9 @@ class LyricsCommand extends BaseSlashCommandInteraction { embedList.push( new EmbedBuilder() .setDescription( - `**${this.embedOptions.icons.queue} Showing lyrics**\n**Track: [${geniusLyricsResult.title}](${geniusLyricsResult.url})**\n**Artist: [${geniusLyricsResult.artist.name}](${geniusLyricsResult.artist.url})**\n\n` + `**${this.embedOptions.icons.queue} Showing lyrics**\n` + + `**Track: [${geniusLyricsResult.title}](${geniusLyricsResult.url})**\n` + + `**Artist: [${geniusLyricsResult.artist.name}](${geniusLyricsResult.artist.url})**\n\n` ) .setColor(this.embedOptions.colors.info) ); @@ -212,7 +215,10 @@ class LyricsCommand extends BaseSlashCommandInteraction { embeds: [ new EmbedBuilder() .setDescription( - `**${this.embedOptions.icons.queue} Showing lyrics**\n**Track: [${geniusLyricsResult.title}](${geniusLyricsResult.url})**\n**Artist: [${geniusLyricsResult.artist.name}](${geniusLyricsResult.artist.url})**\n\n\`\`\`fix\n${geniusLyricsResult.lyrics}\`\`\`` + `**${this.embedOptions.icons.queue} Showing lyrics**\n` + + `**Track: [${geniusLyricsResult.title}](${geniusLyricsResult.url})**\n` + + `**Artist: [${geniusLyricsResult.artist.name}](${geniusLyricsResult.artist.url})**\n\n` + + `\`\`\`fix\n${geniusLyricsResult.lyrics}\`\`\`` ) .setColor(this.embedOptions.colors.info) ] diff --git a/src/interactions/commands/player/nowplaying.ts b/src/interactions/commands/player/nowplaying.ts index 322a92d..a5fb46e 100644 --- a/src/interactions/commands/player/nowplaying.ts +++ b/src/interactions/commands/player/nowplaying.ts @@ -153,7 +153,10 @@ class NowPlayingCommand extends BaseSlashCommandInteraction { const loopModeUserString: string = this.getRepeatModeString(repeatMode); const icon = repeatMode === 3 ? this.embedOptions.icons.autoplay : this.embedOptions.icons.loop; - return `**${icon} Looping**\nLoop mode is set to **\`${loopModeUserString}\`**. You can change it with **\`/loop\`**.`; + return ( + `**${icon} Looping**\n` + + `Loop mode is set to **\`${loopModeUserString}\`**. You can change it with **\`/loop\`**.` + ); }; private getDisplayTrackPlayingStatus = (queue: GuildQueue): string => { diff --git a/src/interactions/commands/player/remove.ts b/src/interactions/commands/player/remove.ts index 0dbf53d..d44d6d9 100644 --- a/src/interactions/commands/player/remove.ts +++ b/src/interactions/commands/player/remove.ts @@ -55,7 +55,9 @@ class RemoveCommand extends BaseSlashCommandInteraction { embeds: [ new EmbedBuilder() .setDescription( - `**${this.embedOptions.icons.warning} Oops!**\nTrack **\`${removeTrackNumber}\`** is not a valid track number. There are a total of **\`${queue.tracks.data.length}\`** tracks in the queue.\n\nView tracks added to the queue with **\`/queue\`**.` + `**${this.embedOptions.icons.warning} Oops!**\n` + + `Track **\`${removeTrackNumber}\`** is not a valid track number. There are a total of **\`${queue.tracks.data.length}\`** tracks in the queue.` + + '\n\nView tracks added to the queue with **`/queue`**.' ) .setColor(this.embedOptions.colors.warning) ] diff --git a/src/interactions/commands/player/shuffle.ts b/src/interactions/commands/player/shuffle.ts index f0c21ab..2b2713f 100644 --- a/src/interactions/commands/player/shuffle.ts +++ b/src/interactions/commands/player/shuffle.ts @@ -35,7 +35,9 @@ class ShuffleCommand extends BaseSlashCommandInteraction { new EmbedBuilder() .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\`**.` + `**${this.embedOptions.icons.shuffled} Shuffled queue tracks**\n` + + `The **${queue.tracks.data.length}** tracks in the queue has been shuffled.\n\n` + + 'View the new queue order with **`/queue`**.' ) .setColor(this.embedOptions.colors.success) ] diff --git a/src/interactions/commands/player/stop.ts b/src/interactions/commands/player/stop.ts index bf3d1dd..ac1c04d 100644 --- a/src/interactions/commands/player/stop.ts +++ b/src/interactions/commands/player/stop.ts @@ -38,7 +38,9 @@ class StopCommand extends BaseSlashCommandInteraction { new EmbedBuilder() .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!` + `**${this.embedOptions.icons.success} Stopped playing**\n` + + 'Stopped playing audio and cleared the track queue.\n\n' + + 'To play more music, use the **`/play`** command!' ) .setColor(this.embedOptions.colors.success) ]