fix: support AttachmentBuilder when creating a sticker

This commit is contained in:
MARCROCK22 2024-05-30 20:12:22 +00:00
parent 00640bfda7
commit 482de42b28

View File

@ -3,8 +3,8 @@ import type {
RESTPatchAPIGuildStickerJSONBody, RESTPatchAPIGuildStickerJSONBody,
RESTPostAPIGuildStickerFormDataBody, RESTPostAPIGuildStickerFormDataBody,
} from 'discord-api-types/v10'; } from 'discord-api-types/v10';
import type { UsingClient } from '..'; import type { RawFile, UsingClient } from '..';
import type { Attachment } from '../builders'; import type { Attachment, AttachmentBuilder } from '../builders';
import type { MethodContext, ObjectToLower } from '../common'; import type { MethodContext, ObjectToLower } from '../common';
import { User } from './User'; import { User } from './User';
import { DiscordBase } from './extra/DiscordBase'; import { DiscordBase } from './extra/DiscordBase';
@ -54,5 +54,5 @@ export class Sticker extends DiscordBase {
} }
export interface CreateStickerBodyRequest extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> { export interface CreateStickerBodyRequest extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
file: Attachment; file: Attachment | AttachmentBuilder | RawFile;
} }