diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-05-04 21:47:08 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 02:47:08 +0200 |
commit | 474932161fb6e50e90cbd4e1546255b6a520394e (patch) | |
tree | 9c62ec029314fbe8447ba85f5ef74e6870f4cc63 /src/api/MessageEvents.ts | |
parent | bd95a25f4c111c3d0e2564fb1bfcf5b8e12e87de (diff) | |
download | Vencord-474932161fb6e50e90cbd4e1546255b6a520394e.tar.gz Vencord-474932161fb6e50e90cbd4e1546255b6a520394e.tar.bz2 Vencord-474932161fb6e50e90cbd4e1546255b6a520394e.zip |
Fix FakeNitro Stickers (#1048)
Diffstat (limited to 'src/api/MessageEvents.ts')
-rw-r--r-- | src/api/MessageEvents.ts | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/api/MessageEvents.ts b/src/api/MessageEvents.ts index 4bd3bc0..50d8b26 100644 --- a/src/api/MessageEvents.ts +++ b/src/api/MessageEvents.ts @@ -63,9 +63,23 @@ export interface Upload { uniqueId: string; uploadedFilename: string; } + +export interface MessageReplyOptions { + messageReference: Message["messageReference"]; + allowedMentions?: { + parse: Array<string>; + repliedUser: boolean; + }; +} + export interface MessageExtra { - stickerIds?: string[]; + stickers?: string[]; uploads?: Upload[]; + replyOptions: MessageReplyOptions; + content: string; + channel: Channel; + type?: any; + openWarningPopout: (props: any) => any; } export type SendListener = (channelId: string, messageObj: MessageObject, extra: MessageExtra) => Promisable<void | { cancel: boolean; }>; @@ -74,8 +88,8 @@ export type EditListener = (channelId: string, messageId: string, messageObj: Me const sendListeners = new Set<SendListener>(); const editListeners = new Set<EditListener>(); -export async function _handlePreSend(channelId: string, messageObj: MessageObject, extra: MessageExtra, uploads: Upload[]) { - extra.uploads = uploads; +export async function _handlePreSend(channelId: string, messageObj: MessageObject, extra: MessageExtra, replyOptions: MessageReplyOptions) { + extra.replyOptions = replyOptions; for (const listener of sendListeners) { try { const result = await listener(channelId, messageObj, extra); |