Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DiscordAPI Empty message error fixed #1183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
16 changes: 11 additions & 5 deletions src/services/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@
private async onAudioPlayerIdle(_oldState: AudioPlayerState, newState: AudioPlayerState): Promise<void> {
// Automatically advance queued song at end
if (this.loopCurrentSong && newState.status === AudioPlayerStatus.Idle && this.status === STATUS.PLAYING) {
await this.seek(0);
await this.seek(0);

Check failure on line 636 in src/services/player.ts

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed
return;
}

Expand All @@ -654,10 +654,16 @@
const settings = await getGuildSettings(this.guildId);
const {autoAnnounceNextSong} = settings;
if (autoAnnounceNextSong && this.currentChannel) {
await this.currentChannel.send({
embeds: this.getCurrent() ? [buildPlayingMessageEmbed(this)] : [],
});
}
if (this.getCurrent()) {
await this.currentChannel.send({
embeds: [buildPlayingMessageEmbed(this)]

Check failure on line 659 in src/services/player.ts

View workflow job for this annotation

GitHub Actions / Lint

Missing trailing comma
});
} else {
await this.currentChannel.send({
content: "Queue is now empty, will leave in "

Check failure on line 663 in src/services/player.ts

View workflow job for this annotation

GitHub Actions / Lint

Strings must use singlequote

Check failure on line 663 in src/services/player.ts

View workflow job for this annotation

GitHub Actions / Lint

Missing trailing comma
});
}
}

Check failure on line 666 in src/services/player.ts

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed
}
}

Expand Down
Loading