mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-25 02:51:57 +01:00
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:
parent
be8b27fbeb
commit
631058093d
@ -106,7 +106,7 @@ export class DiscordVoiceService {
|
||||
changeVolume(volume: number) {
|
||||
if (!this.audioResource || !this.audioResource.volume) {
|
||||
this.logger.error(
|
||||
`Failed to change audio volume, AudioResource or volume was undefined`,
|
||||
"Failed to change audio volume, AudioResource or volume was undefined",
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -248,14 +248,14 @@ export class DiscordVoiceService {
|
||||
private attachEventListenersToAudioPlayer() {
|
||||
if (!this.voiceConnection) {
|
||||
this.logger.error(
|
||||
`Unable to attach listener events, because the VoiceConnection was undefined`,
|
||||
"Unable to attach listener events, because the VoiceConnection was undefined",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.audioPlayer) {
|
||||
this.logger.error(
|
||||
`Unable to attach listener events, because the AudioPlayer was undefined`,
|
||||
"Unable to attach listener events, because the AudioPlayer was undefined",
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -279,7 +279,7 @@ export class DiscordVoiceService {
|
||||
this.audioPlayer.on('stateChange', (previousState) => {
|
||||
if (!this.audioPlayer) {
|
||||
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;
|
||||
}
|
||||
@ -333,7 +333,7 @@ export class DiscordVoiceService {
|
||||
|
||||
if (!playlist) {
|
||||
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;
|
||||
}
|
||||
@ -342,7 +342,7 @@ export class DiscordVoiceService {
|
||||
|
||||
if (!activeTrack) {
|
||||
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;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ export class JellyfinSearchService {
|
||||
|
||||
if (!axiosResponse.data.SearchHints) {
|
||||
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 [];
|
||||
}
|
||||
@ -227,7 +227,7 @@ export class JellyfinSearchService {
|
||||
|
||||
if (!response.data.Items) {
|
||||
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 [];
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ export class PlaylistCommand {
|
||||
|
||||
if (!tempData) {
|
||||
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;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export class UpdatesService {
|
||||
|
||||
if (!latestGitHubRelease) {
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user