mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-31 07:50:09 +00:00
feat(Message): reply updates (#34)
* feat(allowedmentions): replied_user * feat(message): message_reference channel_id is now optional * fix: make message_id required when sending * chore: export APIMessageReferenceSend
This commit is contained in:
@@ -130,7 +130,7 @@ export interface APIMessageApplication {
|
||||
*/
|
||||
export interface APIMessageReference {
|
||||
message_id?: string;
|
||||
channel_id: string;
|
||||
channel_id?: string;
|
||||
guild_id?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface APIAllowedMentionsSend {
|
||||
parse?: AllowedMentionsTypes[];
|
||||
roles?: string[];
|
||||
users?: string[];
|
||||
replied_user?: boolean;
|
||||
}
|
||||
|
||||
// #endregion TypeDefs
|
||||
@@ -66,6 +67,8 @@ export interface RESTGetAPIChannelMessagesQuery {
|
||||
|
||||
export type RESTGetAPIChannelMessagesResult = APIMessage[];
|
||||
|
||||
export type APIMessageReferenceSend = APIMessageReference & Required<Pick<APIMessageReference, 'message_id'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#create-message
|
||||
*/
|
||||
@@ -75,7 +78,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
tts?: boolean;
|
||||
embed?: APIEmbed;
|
||||
allowed_mentions?: APIAllowedMentionsSend;
|
||||
message_reference?: Required<Omit<APIMessageReference, 'guild_id'>> & Pick<APIMessageReference, 'guild_id'>;
|
||||
message_reference?: APIMessageReferenceSend;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,7 +101,7 @@ export type RESTPostAPIChannelMessageFormDataBody =
|
||||
tts?: boolean;
|
||||
embed?: APIEmbed;
|
||||
allowed_mentions?: APIAllowedMentionsSend;
|
||||
message_reference?: APIMessageReference;
|
||||
message_reference?: APIMessageReferenceSend;
|
||||
/**
|
||||
* The file contents
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user