Skip to content

Commit 9bacefb

Browse files
committed
fix(quoi-feur): fix typing need PartialMessage
1 parent 8e69cb6 commit 9bacefb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/modules/quoiFeur/quoiFeur.helpers.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import {
22
ChannelType,
33
type ChatInputCommandInteraction,
44
DMChannel,
5-
type Message,
5+
Message,
66
type NonThreadGuildBasedChannel,
7+
type PartialMessage,
78
} from 'discord.js';
89

910
import { cache } from '../../core/cache';
@@ -62,8 +63,13 @@ export const reactOnEndWithQuoi = async (message: Message) => {
6263
await reactWithFeur(message);
6364
};
6465

65-
export const reactOnEndWithQuoiUpdated = async (_oldMessage: Message, newMessage: Message) =>
66-
reactOnEndWithQuoi(newMessage);
66+
export const reactOnEndWithQuoiUpdated = async (
67+
_oldMessage: Message | PartialMessage,
68+
newMessage: Message | PartialMessage,
69+
) => {
70+
if (!(newMessage instanceof Message)) return;
71+
await reactOnEndWithQuoi(newMessage);
72+
};
6773

6874
export const addQuoiFeurToChannel = async (interaction: ChatInputCommandInteraction) => {
6975
const { channel } = interaction;

0 commit comments

Comments
 (0)