diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-23 18:13:05 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-23 18:13:05 -0500 |
commit | a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (patch) | |
tree | 9b0f8ed8a93c22c90512751e3f2f5937e1925760 /src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts | |
parent | 5557677f1570eb564a30cfcebb6030235dc84d47 (diff) | |
download | tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.gz tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.bz2 tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.zip |
fix discord.js breaking changes, some other stuff
Diffstat (limited to 'src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts')
-rw-r--r-- | src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts new file mode 100644 index 0000000..56bef21 --- /dev/null +++ b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts @@ -0,0 +1,46 @@ +import type { + BushApplicationCommand, + BushClient, + BushGuild, + BushGuildEmoji, + BushGuildMember, + BushGuildTextBasedChannel, + BushNonThreadGuildBasedChannel, + BushRole, + BushTextBasedChannel, + BushUser +} from '#lib'; +import type { APIInteractionGuildMember } from '@discordjs/builders/node_modules/discord-api-types'; +import { ChatInputCommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js'; +import type { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes'; + +export type BushGuildResolvable = + | BushGuild + | BushNonThreadGuildBasedChannel + | BushGuildMember + | BushGuildEmoji + | Invite + | BushRole + | Snowflake; + +/** + * Represents a command interaction. + */ +export class BushChatInputCommandInteraction<Cached extends CacheType = CacheType> extends ChatInputCommandInteraction<Cached> { + public declare readonly client: BushClient; + public declare readonly command: BushApplicationCommand | BushApplicationCommand<{ guild: BushGuildResolvable }> | null; + public declare readonly channel: CacheTypeReducer< + Cached, + BushGuildTextBasedChannel | null, + BushGuildTextBasedChannel | null, + BushGuildTextBasedChannel | null, + BushTextBasedChannel | null + >; + public declare readonly guild: CacheTypeReducer<Cached, BushGuild, null>; + public declare member: CacheTypeReducer<Cached, BushGuildMember, APIInteractionGuildMember>; + public declare user: BushUser; + + public constructor(client: BushClient, data: RawCommandInteractionData) { + super(client, data); + } +} |