Skip to content

Commit

Permalink
feat(APIApplicationCommandInteractionData): add resolved (#86)
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 15, 2021
1 parent 76651ac commit 24155ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion deno/v8/payloads/interactions.ts
@@ -1,6 +1,6 @@
import type { Permissions, Snowflake } from '../../common/mod.ts';
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../rest/mod.ts';
import type { APIGuildMember, APIUser, MessageFlags } from './mod.ts';
import type { APIGuildMember, APIPartialChannel, APIRole, APIUser, MessageFlags } from './mod.ts';

/**
* https://discord.com/developers/docs/interactions/slash-commands#applicationcommand
Expand Down Expand Up @@ -160,6 +160,12 @@ export interface APIApplicationCommandInteractionData {
id: Snowflake;
name: string;
options?: APIApplicationCommandInteractionDataOption[];
resolved?: {
users?: Record<string, APIUser>;
roles?: Record<string, APIRole>;
members?: Record<string, Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> & { permissions: Permissions }>;
channels?: Record<string, Required<APIPartialChannel> & { permissions: Permissions }>;
};
}

/**
Expand Down
8 changes: 7 additions & 1 deletion v8/payloads/interactions.ts
@@ -1,6 +1,6 @@
import type { Permissions, Snowflake } from '../../common/index';
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../rest/index';
import type { APIGuildMember, APIUser, MessageFlags } from './index';
import type { APIGuildMember, APIPartialChannel, APIRole, APIUser, MessageFlags } from './index';

/**
* https://discord.com/developers/docs/interactions/slash-commands#applicationcommand
Expand Down Expand Up @@ -160,6 +160,12 @@ export interface APIApplicationCommandInteractionData {
id: Snowflake;
name: string;
options?: APIApplicationCommandInteractionDataOption[];
resolved?: {
users?: Record<string, APIUser>;
roles?: Record<string, APIRole>;
members?: Record<string, Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> & { permissions: Permissions }>;
channels?: Record<string, Required<APIPartialChannel> & { permissions: Permissions }>;
};
}

/**
Expand Down

0 comments on commit 24155ae

Please sign in to comment.