Skip to content

Commit da49a48

Browse files
committed
hotfix bot detecting wrong embeds
1 parent 5e42ceb commit da49a48

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/modules/helpchan.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ export class HelpChanModule extends Module {
114114
async checkEmptyOngoing(channel: TextChannel) {
115115
const messages = await channel.messages.fetch();
116116

117-
return messages.first()?.author.id === this.client.user?.id;
117+
const embed = messages.first()?.embeds[0];
118+
119+
return (
120+
embed &&
121+
embed.description?.trim() ===
122+
this.AVAILABLE_EMBED.description?.trim()
123+
);
118124
}
119125

120126
async startEmptyTimeout(channel: TextChannel) {

0 commit comments

Comments
 (0)