Skip to content

Commit

Permalink
fixed [Bug]: Song request channel message don't update after the end …
Browse files Browse the repository at this point in the history
…of a song #732
  • Loading branch information
appujet committed Oct 6, 2024
1 parent 45e42b9 commit 7d3c2a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/events/player/QueueEnd.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { TextChannel } from 'discord.js';
import type { Player, Track, TrackStartEvent } from 'lavalink-client';
import { Event, type Lavamusic } from '../../structures/index';
import { updateSetup } from '../../utils/SetupSystem';

export default class QueueEnd extends Event {
constructor(client: Lavamusic, file: string) {
Expand All @@ -12,6 +13,8 @@ export default class QueueEnd extends Event {
public async run(player: Player, _track: Track | null, _payload: TrackStartEvent): Promise<void> {
const guild = this.client.guilds.cache.get(player.guildId);
if (!guild) return;
const locale = await this.client.db.getLanguage(player.guildId);
await updateSetup(this.client, player.guildId, locale);

const messageId = player.get<string | undefined>('messageId');
if (!messageId) return;
Expand Down

0 comments on commit 7d3c2a7

Please sign in to comment.