diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-13 21:20:19 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-13 21:20:19 -0400 |
commit | cc18d21bceee8685b4735de983b549141d720019 (patch) | |
tree | 4f1d10353eaa64bbdf5fd4969ef08682f5bd7612 /src/lib/extensions | |
parent | 70f32554d76dc654616438de411bc7ec613ffd68 (diff) | |
download | tanzanite-cc18d21bceee8685b4735de983b549141d720019.tar.gz tanzanite-cc18d21bceee8685b4735de983b549141d720019.tar.bz2 tanzanite-cc18d21bceee8685b4735de983b549141d720019.zip |
feat: make all base types bush resolvable
Diffstat (limited to 'src/lib/extensions')
-rw-r--r-- | src/lib/extensions/discord.js/other.ts | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/src/lib/extensions/discord.js/other.ts b/src/lib/extensions/discord.js/other.ts index 7705c18..d7fb15b 100644 --- a/src/lib/extensions/discord.js/other.ts +++ b/src/lib/extensions/discord.js/other.ts @@ -20,37 +20,55 @@ import type { PartialBushDMChannel } from '#lib'; import { APIMessage } from 'discord-api-types/v9'; -import type { CacheType, CacheTypeReducer, ChannelType, Collection, Message, Snowflake } from 'discord.js'; +import type { + ApplicationCommandResolvable, + CacheType, + CacheTypeReducer, + ChannelResolvable, + ChannelType, + Collection, + EmojiIdentifierResolvable, + EmojiResolvable, + GuildChannelResolvable, + GuildMemberResolvable, + GuildTextChannelResolvable, + MessageResolvable, + RoleResolvable, + Snowflake, + ThreadChannelResolvable, + ThreadMemberResolvable, + UserResolvable +} from 'discord.js'; /** * Data that resolves to give a ThreadMember object. */ -export type BushThreadMemberResolvable = BushThreadMember | BushUserResolvable; +export type BushThreadMemberResolvable = ThreadMemberResolvable | BushThreadMember | BushUserResolvable; /** * Data that resolves to give a User object. */ -export type BushUserResolvable = BushUser | Snowflake | BushMessage | BushGuildMember | BushThreadMember; +export type BushUserResolvable = UserResolvable | BushUser | Snowflake | BushMessage | BushGuildMember | BushThreadMember; /** * Data that resolves to give a GuildMember object. */ -export type BushGuildMemberResolvable = BushGuildMember | BushUserResolvable; +export type BushGuildMemberResolvable = GuildMemberResolvable | BushGuildMember | BushUserResolvable; /** * Data that can be resolved to a Role object. */ -export type BushRoleResolvable = BushRole | Snowflake; +export type BushRoleResolvable = RoleResolvable | BushRole | Snowflake; /** * Data that can be resolved to a Message object. */ -export type BushMessageResolvable = Message | BushMessage | Snowflake; +export type BushMessageResolvable = MessageResolvable | BushMessage | Snowflake; /** * Data that can be resolved into a GuildEmoji object. */ -export type BushEmojiResolvable = Snowflake | BushGuildEmoji | BushReactionEmoji; +export type BushEmojiResolvable = EmojiResolvable | Snowflake | BushGuildEmoji | BushReactionEmoji; /** * Data that can be resolved to give an emoji identifier. This can be: @@ -58,32 +76,32 @@ export type BushEmojiResolvable = Snowflake | BushGuildEmoji | BushReactionEmoji * * The `<a:name:id>`, `<:name:id>`, `a:name:id` or `name:id` emoji identifier string of an emoji * * An EmojiResolvable */ -export type BushEmojiIdentifierResolvable = string | BushEmojiResolvable; +export type BushEmojiIdentifierResolvable = EmojiIdentifierResolvable | string | BushEmojiResolvable; /** * Data that can be resolved to a Thread Channel object. */ -export type BushThreadChannelResolvable = BushThreadChannel | Snowflake; +export type BushThreadChannelResolvable = ThreadChannelResolvable | BushThreadChannel | Snowflake; /** * Data that resolves to give an ApplicationCommand object. */ -export type BushApplicationCommandResolvable = BushApplicationCommand | Snowflake; +export type BushApplicationCommandResolvable = ApplicationCommandResolvable | BushApplicationCommand | Snowflake; /** * Data that can be resolved to a GuildTextChannel object. */ -export type BushGuildTextChannelResolvable = BushTextChannel | BushNewsChannel | Snowflake; +export type BushGuildTextChannelResolvable = GuildTextChannelResolvable | BushTextChannel | BushNewsChannel | Snowflake; /** * Data that can be resolved to give a Channel object. */ -export type BushChannelResolvable = BushAnyChannel | Snowflake; +export type BushChannelResolvable = ChannelResolvable | BushAnyChannel | Snowflake; /** * Data that can be resolved to give a Guild Channel object. */ -export type BushGuildChannelResolvable = Snowflake | BushGuildBasedChannel; +export type BushGuildChannelResolvable = GuildChannelResolvable | Snowflake | BushGuildBasedChannel; export type BushAnyChannel = | BushCategoryChannel |