From 474932161fb6e50e90cbd4e1546255b6a520394e Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 4 May 2023 21:47:08 -0300 Subject: Fix FakeNitro Stickers (#1048) --- src/api/MessageEvents.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/api/MessageEvents.ts') 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; + 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; @@ -74,8 +88,8 @@ export type EditListener = (channelId: string, messageId: string, messageObj: Me const sendListeners = new Set(); const editListeners = new Set(); -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); -- cgit