We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceb5709 commit 17c107dCopy full SHA for 17c107d
src/modules/quoiFeur/quoiFeur.helpers.ts
@@ -29,8 +29,15 @@ export const reactOnEndWithQuoi = async (message: Message) => {
29
if (!endWithQuoi(message.content)) return;
30
31
const channelIds = await cache.get('quoiFeurChannels', []);
32
- const channelHasGame = channelIds.find((channelId) => channelId === message.channelId);
33
- if (!channelHasGame) return;
+
+ const messageParentId =
34
+ message.channel.type === ChannelType.PublicThread ? message.channel.parentId : null;
35
36
+ const isMessageInQuoiFeurChannel =
37
+ channelIds.includes(message.channelId) ||
38
+ (messageParentId && channelIds.includes(messageParentId));
39
40
+ if (!isMessageInQuoiFeurChannel) return;
41
42
const probability = 1 / 6;
43
0 commit comments