Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ApplicationCommand): attachment application command option type #272

Merged
merged 6 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { APIRole, APIUser, ChannelType } from '../../mod.ts';
import type { Snowflake } from '../../../../globals.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
import type { APIAttachment } from '../../channel.ts';
import type {
APIApplicationCommandInteractionWrapper,
APIInteractionDataResolvedChannel,
Expand Down Expand Up @@ -142,6 +143,7 @@ export enum ApplicationCommandOptionType {
Role,
Mentionable,
Number,
Attachment,
}

/**
Expand Down Expand Up @@ -217,6 +219,11 @@ export interface ApplicationCommandInteractionDataOptionNumber
focused?: boolean;
}

export type ApplicationCommandInteractionDataOptionAttachment = InteractionDataOptionBase<
ApplicationCommandOptionType.Attachment,
APIAttachment
amitojsingh366 marked this conversation as resolved.
Show resolved Hide resolved
>;

export type ApplicationCommandInteractionDataOptionBoolean = InteractionDataOptionBase<
ApplicationCommandOptionType.Boolean,
boolean
Expand Down Expand Up @@ -245,6 +252,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
attachments?: Record<Snowflake, APIAttachment>;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { APIRole, APIUser, ChannelType } from '../../mod.ts';
import type { Snowflake } from '../../../../globals.ts';
import type { APIAttachment } from '../../channel.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
import type {
APIApplicationCommandInteractionWrapper,
Expand Down Expand Up @@ -138,6 +139,7 @@ export enum ApplicationCommandOptionType {
Role,
Mentionable,
Number,
Attachment,
}

/**
Expand Down Expand Up @@ -208,6 +210,11 @@ export interface ApplicationCommandInteractionDataOptionInteger
focused?: boolean;
}

export type ApplicationCommandInteractionDataOptionAttachment = InteractionDataOptionBase<
ApplicationCommandOptionType.Attachment,
APIAttachment
>;

export interface ApplicationCommandInteractionDataOptionNumber
extends InteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
focused?: boolean;
Expand Down Expand Up @@ -241,6 +248,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
attachments?: Record<Snowflake, APIAttachment>;
}

/**
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions payloads/v8/_interactions/_applicationCommands/chatInput.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { APIRole, APIUser, ChannelType } from '../../index';
import type { Snowflake } from '../../../../globals';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
import type { APIAttachment } from '../../channel';
import type {
APIApplicationCommandInteractionWrapper,
APIInteractionDataResolvedChannel,
Expand Down Expand Up @@ -142,6 +143,7 @@ export const enum ApplicationCommandOptionType {
Role,
Mentionable,
Number,
Attachment,
}

/**
Expand Down Expand Up @@ -217,6 +219,11 @@ export interface ApplicationCommandInteractionDataOptionNumber
focused?: boolean;
}

export type ApplicationCommandInteractionDataOptionAttachment = InteractionDataOptionBase<
ApplicationCommandOptionType.Attachment,
APIAttachment
>;

export type ApplicationCommandInteractionDataOptionBoolean = InteractionDataOptionBase<
ApplicationCommandOptionType.Boolean,
boolean
Expand Down Expand Up @@ -245,6 +252,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
attachments?: Record<Snowflake, APIAttachment>;
}

/**
Expand Down
8 changes: 8 additions & 0 deletions payloads/v9/_interactions/_applicationCommands/chatInput.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { APIRole, APIUser, ChannelType } from '../../index';
import type { Snowflake } from '../../../../globals';
import type { APIAttachment } from '../../channel';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
import type {
APIApplicationCommandInteractionWrapper,
Expand Down Expand Up @@ -138,6 +139,7 @@ export const enum ApplicationCommandOptionType {
Role,
Mentionable,
Number,
Attachment,
}

/**
Expand Down Expand Up @@ -208,6 +210,11 @@ export interface ApplicationCommandInteractionDataOptionInteger
focused?: boolean;
}

export type ApplicationCommandInteractionDataOptionAttachment = InteractionDataOptionBase<
ApplicationCommandOptionType.Attachment,
APIAttachment
>;

export interface ApplicationCommandInteractionDataOptionNumber
extends InteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
focused?: boolean;
Expand Down Expand Up @@ -241,6 +248,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
attachments?: Record<Snowflake, APIAttachment>;
}

/**
Expand Down