Try to fix sending messages with discord-go
This commit is contained in:
parent
3c39e0270f
commit
62016a8043
Binary file not shown.
@ -89,6 +89,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
|
|||||||
reactions: opts.reactions || [],
|
reactions: opts.reactions || [],
|
||||||
type: opts.type ?? 0,
|
type: opts.type ?? 0,
|
||||||
mentions: [],
|
mentions: [],
|
||||||
|
components: opts.components ?? undefined, // Fix Discord-Go?
|
||||||
});
|
});
|
||||||
|
|
||||||
if (cloudAttachments && cloudAttachments.length > 0) {
|
if (cloudAttachments && cloudAttachments.length > 0) {
|
||||||
|
|||||||
@ -60,8 +60,8 @@ export interface MessageCreateSchema {
|
|||||||
TODO: OpenWAAO<-->attachment-style metadata conversion
|
TODO: OpenWAAO<-->attachment-style metadata conversion
|
||||||
**/
|
**/
|
||||||
attachments?: (MessageCreateAttachment | MessageCreateCloudAttachment)[];
|
attachments?: (MessageCreateAttachment | MessageCreateCloudAttachment)[];
|
||||||
sticker_ids?: string[];
|
sticker_ids?: string[] | null; // null check: fixes Discord-Go
|
||||||
components?: ActionRowComponent[];
|
components?: ActionRowComponent[] | null; // null check: fixes Discord-Go
|
||||||
// TODO: Fix TypeScript errors in src\api\util\handlers\Message.ts once this is enabled
|
// TODO: Fix TypeScript errors in src\api\util\handlers\Message.ts once this is enabled
|
||||||
poll?: PollCreationSchema;
|
poll?: PollCreationSchema;
|
||||||
enforce_nonce?: boolean; // For Discord compatibility, it's the default behavior here
|
enforce_nonce?: boolean; // For Discord compatibility, it's the default behavior here
|
||||||
|
|||||||
Reference in New Issue
Block a user