mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
types: Swap message reaction and emoji identifier types (#8969)
* types: swap message reaction and identifier types * docs: reflect changes * types: simplification Co-authored-by: Aura Román <kyradiscord@gmail.com> Co-authored-by: Aura Román <kyradiscord@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -50,9 +50,9 @@ class BaseGuildEmojiManager extends CachedManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Data that can be resolved to give an emoji identifier. This can be:
|
* 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
|
* * 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
|
* @typedef {string|EmojiResolvable} EmojiIdentifierResolvable
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class ReactionManager extends CachedManager {
|
|||||||
* Data that can be resolved to a MessageReaction object. This can be:
|
* Data that can be resolved to a MessageReaction object. This can be:
|
||||||
* * A MessageReaction
|
* * A MessageReaction
|
||||||
* * A Snowflake
|
* * A Snowflake
|
||||||
|
* * The Unicode representation of an emoji
|
||||||
* @typedef {MessageReaction|Snowflake} MessageReactionResolvable
|
* @typedef {MessageReaction|Snowflake} MessageReactionResolvable
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
14
packages/discord.js/typings/index.d.ts
vendored
14
packages/discord.js/typings/index.d.ts
vendored
@@ -5043,7 +5043,11 @@ export interface EmbedField {
|
|||||||
inline: boolean;
|
inline: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EmojiIdentifierResolvable = string | EmojiResolvable;
|
export type EmojiIdentifierResolvable =
|
||||||
|
| EmojiResolvable
|
||||||
|
| `${'' | 'a:'}${string}:${Snowflake}`
|
||||||
|
| `<${'' | 'a'}:${string}:${Snowflake}>`
|
||||||
|
| string;
|
||||||
|
|
||||||
export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
|
export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
|
||||||
|
|
||||||
@@ -5788,13 +5792,7 @@ export interface MessageEditOptions extends Omit<BaseMessageOptions, 'content'>
|
|||||||
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'SuppressEmbeds'>, MessageFlags.SuppressEmbeds>;
|
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'SuppressEmbeds'>, MessageFlags.SuppressEmbeds>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MessageReactionResolvable =
|
export type MessageReactionResolvable = MessageReaction | Snowflake | string;
|
||||||
| MessageReaction
|
|
||||||
| Snowflake
|
|
||||||
| `${string}:${Snowflake}`
|
|
||||||
| `<:${string}:${Snowflake}>`
|
|
||||||
| `<a:${string}:${Snowflake}>`
|
|
||||||
| string;
|
|
||||||
|
|
||||||
export interface MessageReference {
|
export interface MessageReference {
|
||||||
channelId: Snowflake;
|
channelId: Snowflake;
|
||||||
|
|||||||
Reference in New Issue
Block a user