Skip to content

Commit caef412

Browse files
committed
fix(quoi-feur): quoi-feur with edited messages
1 parent cf4a36b commit caef412

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/modules/quoiFeur/quoiFeur.helpers.ts

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export const reactOnEndWithQuoi = async (message: Message) => {
6262
await reactWithFeur(message);
6363
};
6464

65+
export const reactOnEndWithQuoiUpdated = async (oldMessage: Message, newMessage: Message) =>
66+
reactOnEndWithQuoi(newMessage);
67+
6568
export const addQuoiFeurToChannel = async (interaction: ChatInputCommandInteraction) => {
6669
const { channel } = interaction;
6770
if (!channel || !channel.isTextBased() || channel.type !== ChannelType.GuildText) return;

src/modules/quoiFeur/quoiFeur.module.ts

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
addQuoiFeurToChannel,
66
cleanCacheOnChannelDelete,
77
reactOnEndWithQuoi,
8+
reactOnEndWithQuoiUpdated,
89
removeQuoiFeurFromChannel,
910
} from './quoiFeur.helpers';
1011

@@ -31,6 +32,7 @@ export const quoiFeur = createModule({
3132
],
3233
eventHandlers: () => ({
3334
messageCreate: reactOnEndWithQuoi,
35+
messageUpdate: reactOnEndWithQuoiUpdated,
3436
channelDelete: cleanCacheOnChannelDelete,
3537
}),
3638
intents: ['Guilds', 'GuildMessages', 'MessageContent', 'GuildMessageReactions'],

0 commit comments

Comments
 (0)