mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 22:53:02 -04:00
Fix FakeNitro Stickers (#1048)
This commit is contained in:
parent
bd95a25f4c
commit
474932161f
4 changed files with 28 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue