types: Swap message reaction and emoji identifier types (#8970)

Co-authored-by: Aura Román <kyradiscord@gmail.com>
This commit is contained in:
Jiralite 2023-01-01 17:28:56 +00:00 committed by GitHub
parent 4ec3355961
commit 649058055a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 10 deletions

View file

@ -50,9 +50,9 @@ class BaseGuildEmojiManager extends CachedManager {
/**
* Data that can be resolved to give an emoji identifier. This can be:
* * The unicode representation of an emoji
* * The `<a:name:id>`, `<:name:id>`, `a:name:id` or `name:id` emoji identifier string of an emoji
* * An EmojiResolvable
* * The `<a:name:id>`, `<:name:id>`, `a:name:id` or `name:id` emoji identifier string of an emoji
* * The Unicode representation of an emoji
* @typedef {string|EmojiResolvable} EmojiIdentifierResolvable
*/

View file

@ -32,6 +32,7 @@ class ReactionManager extends CachedManager {
* Data that can be resolved to a MessageReaction object. This can be:
* * A MessageReaction
* * A Snowflake
* * The Unicode representation of an emoji
* @typedef {MessageReaction|Snowflake} MessageReactionResolvable
*/

14
typings/index.d.ts vendored
View file

@ -4638,7 +4638,11 @@ export interface EmbedFooterData {
iconURL?: string;
}
export type EmojiIdentifierResolvable = string | EmojiResolvable;
export type EmojiIdentifierResolvable =
| EmojiResolvable
| `${'' | 'a:'}${string}:${Snowflake}`
| `<${'' | 'a'}:${string}:${Snowflake}>`
| string;
export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
@ -5490,13 +5494,7 @@ export interface MessageOptions {
flags?: BitFieldResolvable<'SUPPRESS_EMBEDS', number>;
}
export type MessageReactionResolvable =
| MessageReaction
| Snowflake
| `${string}:${Snowflake}`
| `<:${string}:${Snowflake}>`
| `<a:${string}:${Snowflake}>`
| string;
export type MessageReactionResolvable = MessageReaction | Snowflake | string;
export interface MessageReference {
channelId: Snowflake;