Module
x/discord_api_types/rest/v6/channel.ts
Up to date Discord API Typings, versioned by the API version
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311import type { APIChannel, APIEmbed, APIFollowedChannel, APIInvite, APIMessage, APIMessageReference, APIOverwrite, APIUser, ChannelType, InviteTargetUserType, MessageFlags, OverwriteType,} from '../../payloads/v6/mod.ts';
// #region TypeDefs
/** * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface APIOverwriteSend { id: string; type: OverwriteType; allow: number | string; deny: number | string;}
/** * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export enum AllowedMentionsTypes { Everyone = 'everyone', Role = 'roles', User = 'users',}
/** * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface APIAllowedMentionsSend { parse?: AllowedMentionsTypes[]; roles?: string[]; users?: string[];}
// #endregion TypeDefs
/** * https://discord.com/developers/docs/resources/channel#modify-channel * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTPatchAPIChannelJSONBody { name?: string; type?: ChannelType.GUILD_NEWS | ChannelType.GUILD_TEXT; position?: number | null; topic?: string | null; nsfw?: boolean | null; rate_limit_per_user?: number | null; user_limit?: number | null; permission_overwrites?: APIOverwrite[] | null; parent_id?: string | null;}
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTGetAPIChannelResult = APIChannel;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPatchAPIChannelResult = APIChannel;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTDeleteAPIChannelResult = APIChannel;
/** * https://discord.com/developers/docs/resources/channel#get-channel-messages * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTGetAPIChannelMessagesQuery { around?: string; before?: string; after?: string; limit?: number;}
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTGetAPIChannelMessagesResult = APIMessage[];
/** * https://discord.com/developers/docs/resources/channel#create-message * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTPostAPIChannelMessageJSONBody { content?: string; nonce?: number | string; tts?: boolean; embed?: APIEmbed; allowed_mentions?: APIAllowedMentionsSend; message_reference?: APIMessageReference;}
/** * https://discord.com/developers/docs/resources/channel#create-message * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPostAPIChannelMessageFormDataBody = | { /** * JSON stringified message body */ payload_json?: string; /** * The file contents */ file: unknown; } | { content?: string; nonce?: number | string; tts?: boolean; embed?: APIEmbed; allowed_mentions?: APIAllowedMentionsSend; message_reference?: APIMessageReference; /** * The file contents */ file: unknown; };
/** * https://discord.com/developers/docs/resources/channel#edit-message * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTPatchAPIChannelMessageJSONBody { content?: string | null; embed?: APIEmbed | null; allowed_mentions?: APIAllowedMentionsSend | null; flags?: MessageFlags | null;}
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTGetAPIChannelMessageResult = APIMessage;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPostAPIChannelMessageResult = APIMessage;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPatchAPIChannelMessageResult = APIMessage;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTDeleteAPIChannelMessageResult = never;
/** * https://discord.com/developers/docs/resources/channel#get-reactions * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTGetAPIChannelMessageReactionsQuery { before?: string; after?: string; limit?: number;}
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTGetAPIChannelMessageReactionsResult = APIUser[];
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPutAPIChannelMessageReactionResult = never;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTDeleteAPIChannelMessageReactionResult = never;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTDeleteAPIChannelAllMessageReactionsResult = never;
/** * https://discord.com/developers/docs/resources/channel#bulk-delete-messages * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody { messages: string[];}
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPostAPIChannelMessagesBulkDeleteResult = never;
/** * https://discord.com/developers/docs/resources/channel#edit-channel-permissions * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTPutAPIChannelPermissionsJSONBody { allow: number | string; deny: number | string; type: OverwriteType;}
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPutAPIChannelPermissionsResult = never;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTDeleteAPIChannelPermissionsResult = never;
/** * https://discord.com/developers/docs/resources/channel#get-channel-invites * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTGetAPIChannelInvitesResult = APIInvite[];
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTPostAPIChannelInviteJSONBody { max_age?: number; max_uses?: number; temporary?: boolean; unique?: boolean; target_user_id?: string; target_user_type?: InviteTargetUserType;}
/** * https://discord.com/developers/docs/resources/channel#trigger-typing-indicator * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPostAPIChannelTypingResult = never;
/** * https://discord.com/developers/docs/resources/channel#get-pinned-messages * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTGetAPIChannelPinsResult = APIMessage[];
/** * https://discord.com/developers/docs/resources/channel#add-pinned-channel-message * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPutAPIChannelPinResult = never;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTDeleteAPIChannelPinResult = never;
/** * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTPutAPIChannelRecipientJSONBody { access_token: string; nick?: string;}
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPutAPIChannelRecipientResult = unknown;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTDeleteAPIChannelRecipientResult = unknown;
// TODO: Docs updated once https://github.com/discord/discord-api-docs/pull/1692/files is merged
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPostAPIChannelMessageCrosspostResult = APIMessage;
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export interface RESTPostAPIChannelFollowersJSONBody { webhook_channel_id: string;}
/** * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. */export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;