Skip to content

Commit

Permalink
feat(ApplicationCommand): attachment application command option type (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amitojsingh366 committed Feb 9, 2022
1 parent ee2b7cd commit 71c4e6a
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 12 deletions.
@@ -0,0 +1,11 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';

export type APIApplicationCommandAttachmentOption =
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;

export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<
ApplicationCommandOptionType.Attachment,
Snowflake
>;
Expand Up @@ -12,6 +12,7 @@ export enum ApplicationCommandOptionType {
Role,
Mentionable,
Number,
Attachment,
}

/**
Expand Down
14 changes: 11 additions & 3 deletions deno/payloads/v8/_interactions/_applicationCommands/chatInput.ts
@@ -1,5 +1,5 @@
import type { Snowflake } from '../../../../globals.ts';
import type { APIRole, APIUser } from '../../mod.ts';
import type { APIAttachment, APIRole, APIUser } from '../../mod.ts';
import type {
APIApplicationCommandInteractionWrapper,
APIInteractionDataResolvedChannel,
Expand Down Expand Up @@ -41,6 +41,10 @@ import type {
APIApplicationCommandNumberOption,
APIApplicationCommandInteractionDataNumberOption,
} from './_chatInput/number.ts';
import type {
APIApplicationCommandAttachmentOption,
APIApplicationCommandInteractionDataAttachmentOption,
} from './_chatInput/attachment.ts';
import type {
APIApplicationCommandSubcommandOption,
APIApplicationCommandInteractionDataSubcommandOption,
Expand All @@ -58,6 +62,7 @@ export * from './_chatInput/channel.ts';
export * from './_chatInput/role.ts';
export * from './_chatInput/mentionable.ts';
export * from './_chatInput/number.ts';
export * from './_chatInput/attachment.ts';
export * from './_chatInput/subcommand.ts';
export * from './_chatInput/subcommandGroup.ts';
export * from './_chatInput/shared.ts';
Expand All @@ -73,7 +78,8 @@ export type APIApplicationCommandBasicOption =
| APIApplicationCommandChannelOption
| APIApplicationCommandRoleOption
| APIApplicationCommandMentionableOption
| APIApplicationCommandNumberOption;
| APIApplicationCommandNumberOption
| APIApplicationCommandAttachmentOption;

/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
Expand All @@ -99,7 +105,8 @@ export type APIApplicationCommandInteractionDataBasicOption =
| APIApplicationCommandInteractionDataChannelOption
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataMentionableOption
| APIApplicationCommandInteractionDataNumberOption;
| APIApplicationCommandInteractionDataNumberOption
| APIApplicationCommandInteractionDataAttachmentOption;

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
Expand All @@ -118,6 +125,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
attachments?: Record<Snowflake, APIAttachment>;
}

/**
Expand Down
@@ -0,0 +1,11 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';

export type APIApplicationCommandAttachmentOption =
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;

export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<
ApplicationCommandOptionType.Attachment,
Snowflake
>;
Expand Up @@ -12,6 +12,7 @@ export enum ApplicationCommandOptionType {
Role,
Mentionable,
Number,
Attachment,
}

/**
Expand Down
14 changes: 11 additions & 3 deletions deno/payloads/v9/_interactions/_applicationCommands/chatInput.ts
@@ -1,5 +1,5 @@
import type { Snowflake } from '../../../../globals.ts';
import type { APIRole, APIUser } from '../../mod.ts';
import type { APIAttachment, APIRole, APIUser } from '../../mod.ts';
import type {
APIApplicationCommandInteractionWrapper,
APIInteractionDataResolvedChannel,
Expand Down Expand Up @@ -41,6 +41,10 @@ import type {
APIApplicationCommandNumberOption,
APIApplicationCommandInteractionDataNumberOption,
} from './_chatInput/number.ts';
import type {
APIApplicationCommandAttachmentOption,
APIApplicationCommandInteractionDataAttachmentOption,
} from './_chatInput/attachment.ts';
import type {
APIApplicationCommandSubcommandOption,
APIApplicationCommandInteractionDataSubcommandOption,
Expand All @@ -58,6 +62,7 @@ export * from './_chatInput/channel.ts';
export * from './_chatInput/role.ts';
export * from './_chatInput/mentionable.ts';
export * from './_chatInput/number.ts';
export * from './_chatInput/attachment.ts';
export * from './_chatInput/subcommand.ts';
export * from './_chatInput/subcommandGroup.ts';
export * from './_chatInput/shared.ts';
Expand All @@ -73,7 +78,8 @@ export type APIApplicationCommandBasicOption =
| APIApplicationCommandChannelOption
| APIApplicationCommandRoleOption
| APIApplicationCommandMentionableOption
| APIApplicationCommandNumberOption;
| APIApplicationCommandNumberOption
| APIApplicationCommandAttachmentOption;

/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
Expand All @@ -99,7 +105,8 @@ export type APIApplicationCommandInteractionDataBasicOption =
| APIApplicationCommandInteractionDataChannelOption
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataMentionableOption
| APIApplicationCommandInteractionDataNumberOption;
| APIApplicationCommandInteractionDataNumberOption
| APIApplicationCommandInteractionDataAttachmentOption;

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
Expand All @@ -118,6 +125,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
attachments?: Record<Snowflake, APIAttachment>;
}

/**
Expand Down
@@ -0,0 +1,11 @@
import type { Snowflake } from '../../../../../globals';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';

export type APIApplicationCommandAttachmentOption =
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;

export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<
ApplicationCommandOptionType.Attachment,
Snowflake
>;
Expand Up @@ -12,6 +12,7 @@ export enum ApplicationCommandOptionType {
Role,
Mentionable,
Number,
Attachment,
}

/**
Expand Down
14 changes: 11 additions & 3 deletions payloads/v8/_interactions/_applicationCommands/chatInput.ts
@@ -1,5 +1,5 @@
import type { Snowflake } from '../../../../globals';
import type { APIRole, APIUser } from '../../index';
import type { APIAttachment, APIRole, APIUser } from '../../index';
import type {
APIApplicationCommandInteractionWrapper,
APIInteractionDataResolvedChannel,
Expand Down Expand Up @@ -41,6 +41,10 @@ import type {
APIApplicationCommandNumberOption,
APIApplicationCommandInteractionDataNumberOption,
} from './_chatInput/number';
import type {
APIApplicationCommandAttachmentOption,
APIApplicationCommandInteractionDataAttachmentOption,
} from './_chatInput/attachment';
import type {
APIApplicationCommandSubcommandOption,
APIApplicationCommandInteractionDataSubcommandOption,
Expand All @@ -58,6 +62,7 @@ export * from './_chatInput/channel';
export * from './_chatInput/role';
export * from './_chatInput/mentionable';
export * from './_chatInput/number';
export * from './_chatInput/attachment';
export * from './_chatInput/subcommand';
export * from './_chatInput/subcommandGroup';
export * from './_chatInput/shared';
Expand All @@ -73,7 +78,8 @@ export type APIApplicationCommandBasicOption =
| APIApplicationCommandChannelOption
| APIApplicationCommandRoleOption
| APIApplicationCommandMentionableOption
| APIApplicationCommandNumberOption;
| APIApplicationCommandNumberOption
| APIApplicationCommandAttachmentOption;

/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
Expand All @@ -99,7 +105,8 @@ export type APIApplicationCommandInteractionDataBasicOption =
| APIApplicationCommandInteractionDataChannelOption
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataMentionableOption
| APIApplicationCommandInteractionDataNumberOption;
| APIApplicationCommandInteractionDataNumberOption
| APIApplicationCommandInteractionDataAttachmentOption;

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
Expand All @@ -118,6 +125,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
attachments?: Record<Snowflake, APIAttachment>;
}

/**
Expand Down
@@ -0,0 +1,11 @@
import type { Snowflake } from '../../../../../globals';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';

export type APIApplicationCommandAttachmentOption =
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;

export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<
ApplicationCommandOptionType.Attachment,
Snowflake
>;
Expand Up @@ -12,6 +12,7 @@ export enum ApplicationCommandOptionType {
Role,
Mentionable,
Number,
Attachment,
}

/**
Expand Down
14 changes: 11 additions & 3 deletions payloads/v9/_interactions/_applicationCommands/chatInput.ts
@@ -1,5 +1,5 @@
import type { Snowflake } from '../../../../globals';
import type { APIRole, APIUser } from '../../index';
import type { APIAttachment, APIRole, APIUser } from '../../index';
import type {
APIApplicationCommandInteractionWrapper,
APIInteractionDataResolvedChannel,
Expand Down Expand Up @@ -41,6 +41,10 @@ import type {
APIApplicationCommandNumberOption,
APIApplicationCommandInteractionDataNumberOption,
} from './_chatInput/number';
import type {
APIApplicationCommandAttachmentOption,
APIApplicationCommandInteractionDataAttachmentOption,
} from './_chatInput/attachment';
import type {
APIApplicationCommandSubcommandOption,
APIApplicationCommandInteractionDataSubcommandOption,
Expand All @@ -58,6 +62,7 @@ export * from './_chatInput/channel';
export * from './_chatInput/role';
export * from './_chatInput/mentionable';
export * from './_chatInput/number';
export * from './_chatInput/attachment';
export * from './_chatInput/subcommand';
export * from './_chatInput/subcommandGroup';
export * from './_chatInput/shared';
Expand All @@ -73,7 +78,8 @@ export type APIApplicationCommandBasicOption =
| APIApplicationCommandChannelOption
| APIApplicationCommandRoleOption
| APIApplicationCommandMentionableOption
| APIApplicationCommandNumberOption;
| APIApplicationCommandNumberOption
| APIApplicationCommandAttachmentOption;

/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
Expand All @@ -99,7 +105,8 @@ export type APIApplicationCommandInteractionDataBasicOption =
| APIApplicationCommandInteractionDataChannelOption
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataMentionableOption
| APIApplicationCommandInteractionDataNumberOption;
| APIApplicationCommandInteractionDataNumberOption
| APIApplicationCommandInteractionDataAttachmentOption;

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
Expand All @@ -118,6 +125,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
attachments?: Record<Snowflake, APIAttachment>;
}

/**
Expand Down

0 comments on commit 71c4e6a

Please sign in to comment.