Skip to content

Commit 40964b3

Browse files
refactor: change guard close order
1 parent 1604ad6 commit 40964b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/quoiFeur/quoiFeur.helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ const reactWithCoubeh = async (message: Message) => {
4444
};
4545

4646
export const reactOnEndWithQuoi = async (message: Message) => {
47+
if (!endWithQuoi(message.content)) return;
48+
4749
const channelIds = await cache.get('quoiFeurChannels', []);
4850
const channelHasGame = channelIds.find((channelId) => channelId === message.channelId);
4951
if (!channelHasGame) return;
5052

51-
if (!endWithQuoi(message.content)) return;
52-
5353
const probability = 1 / 20;
5454

5555
Math.random() <= probability ? await reactWithCoubeh(message) : await reactWithFeur(message);

0 commit comments

Comments
 (0)