replace template strings with regular string literals (#229)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
deepsource-autofix[bot] 2023-09-03 14:25:09 +02:00 committed by GitHub
parent be8b27fbeb
commit 631058093d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -106,7 +106,7 @@ export class DiscordVoiceService {
changeVolume(volume: number) { changeVolume(volume: number) {
if (!this.audioResource || !this.audioResource.volume) { if (!this.audioResource || !this.audioResource.volume) {
this.logger.error( this.logger.error(
`Failed to change audio volume, AudioResource or volume was undefined`, "Failed to change audio volume, AudioResource or volume was undefined",
); );
return; return;
} }
@ -248,14 +248,14 @@ export class DiscordVoiceService {
private attachEventListenersToAudioPlayer() { private attachEventListenersToAudioPlayer() {
if (!this.voiceConnection) { if (!this.voiceConnection) {
this.logger.error( this.logger.error(
`Unable to attach listener events, because the VoiceConnection was undefined`, "Unable to attach listener events, because the VoiceConnection was undefined",
); );
return; return;
} }
if (!this.audioPlayer) { if (!this.audioPlayer) {
this.logger.error( this.logger.error(
`Unable to attach listener events, because the AudioPlayer was undefined`, "Unable to attach listener events, because the AudioPlayer was undefined",
); );
return; return;
} }
@ -279,7 +279,7 @@ export class DiscordVoiceService {
this.audioPlayer.on('stateChange', (previousState) => { this.audioPlayer.on('stateChange', (previousState) => {
if (!this.audioPlayer) { if (!this.audioPlayer) {
this.logger.error( this.logger.error(
`Unable to process state change from audio player, because the current audio player in the callback was undefined`, "Unable to process state change from audio player, because the current audio player in the callback was undefined",
); );
return; return;
} }
@ -333,7 +333,7 @@ export class DiscordVoiceService {
if (!playlist) { if (!playlist) {
this.logger.error( this.logger.error(
`Failed to update ellapsed audio time because playlist was unexpectitly undefined`, "Failed to update ellapsed audio time because playlist was unexpectitly undefined",
); );
return; return;
} }
@ -342,7 +342,7 @@ export class DiscordVoiceService {
if (!activeTrack) { if (!activeTrack) {
this.logger.error( this.logger.error(
`Failed to update ellapsed audio time because active track was unexpectitly undefined`, "Failed to update ellapsed audio time because active track was unexpectitly undefined",
); );
return; return;
} }

View File

@ -118,7 +118,7 @@ export class JellyfinSearchService {
if (!axiosResponse.data.SearchHints) { if (!axiosResponse.data.SearchHints) {
this.logger.error( this.logger.error(
`Received an unexpected empty list but expected a list of tracks of the album`, "Received an unexpected empty list but expected a list of tracks of the album",
); );
return []; return [];
} }
@ -227,7 +227,7 @@ export class JellyfinSearchService {
if (!response.data.Items) { if (!response.data.Items) {
this.logger.error( this.logger.error(
`Received empty list of items but expected a random list of tracks`, "Received empty list of items but expected a random list of tracks",
); );
return []; return [];
} }

View File

@ -97,7 +97,7 @@ export class PlaylistCommand {
if (!tempData) { if (!tempData) {
this.logger.warn( this.logger.warn(
`Failed to update from interval, because temp data was not found`, "Failed to update from interval, because temp data was not found",
); );
return; return;
} }

View File

@ -33,7 +33,7 @@ export class UpdatesService {
if (!latestGitHubRelease) { if (!latestGitHubRelease) {
this.logger.warn( this.logger.warn(
`Aborting update check because api request failed. Please check your internet connection or disable the check`, "Aborting update check because api request failed. Please check your internet connection or disable the check",
); );
return; return;
} }