This commit is contained in:
NoLogicAlan committed 2026-05-14 16:59:23 +03:00
1 parent a78edeaa9a
commit 4a62defe1b
6 files changed
+142 -171

No files matched your search

+1 -2
View File
@@ -28,8 +28,7 @@ export async function run(msg, data) {
if (!targetChannel) return msg.reply(embed(this.t(msg, "responses.forceleave.channelNotFound")));
if (cleanId(msg.message.guildId) !== cleanId(targetChannel.guildId))
return msg.reply(embed(this.t(msg, "responses.forceleave.wrongServer")));
const p = this.players.playerMap.get(cid)
?? [...this.players.playerMap.values()].find((player) => cleanId(player?._channelId) === cid);
const p = this.players.findPlayerEntryByChannelId(cid)?.player ?? null;
if (!p) return msg.reply(embed(this.t(msg, "responses.forceleave.playerNotFound")));
if (!p.connection) return msg.reply(embed(this.t(msg, "responses.forceleave.playerNotInit")));
await this.players.leave(msg, cid);