23 | );
24 |
25 | export default memo(StatisticsFeature);
26 |
--------------------------------------------------------------------------------
/payloads/v8/_interactions/_applicationCommands/_chatInput/role.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../../../../globals';
2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
3 | import type { ApplicationCommandOptionType } from './shared';
4 |
5 | /**
6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
7 | */
8 | export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase;
9 |
10 | /**
11 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
12 | */
13 | export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<
14 | ApplicationCommandOptionType.Role,
15 | Snowflake
16 | >;
17 |
--------------------------------------------------------------------------------
/payloads/v8/_interactions/_applicationCommands/_chatInput/user.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../../../../globals';
2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
3 | import type { ApplicationCommandOptionType } from './shared';
4 |
5 | /**
6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
7 | */
8 | export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase;
9 |
10 | /**
11 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
12 | */
13 | export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<
14 | ApplicationCommandOptionType.User,
15 | Snowflake
16 | >;
17 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": ["config:recommended", ":semanticCommitTypeAll(chore)"],
4 | "semanticCommits": "enabled",
5 | "lockFileMaintenance": {
6 | "enabled": true,
7 | "schedule": ["before 1pm on friday"],
8 | "automerge": true
9 | },
10 | "ignorePaths": ["website/"],
11 | "packageRules": [
12 | {
13 | "matchUpdateTypes": ["patch", "minor"],
14 | "matchCurrentVersion": "!/^0/",
15 | "groupName": "patch/minor dependencies",
16 | "groupSlug": "all-non-major",
17 | "automerge": true
18 | },
19 | {
20 | "groupName": "eslint/prettier",
21 | "automerge": true,
22 | "groupSlug": "formatting-linting-dependencies",
23 | "matchPackageNames": ["/eslint/", "/prettier/"]
24 | }
25 | ],
26 | "schedule": ["before 1pm on friday"]
27 | }
28 |
--------------------------------------------------------------------------------
/deno/payloads/v8/_interactions/_applicationCommands/_chatInput/role.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../../../../globals.ts';
2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
3 | import type { ApplicationCommandOptionType } from './shared.ts';
4 |
5 | /**
6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
7 | */
8 | export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase;
9 |
10 | /**
11 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
12 | */
13 | export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<
14 | ApplicationCommandOptionType.Role,
15 | Snowflake
16 | >;
17 |
--------------------------------------------------------------------------------
/deno/payloads/v8/_interactions/_applicationCommands/_chatInput/user.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../../../../globals.ts';
2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
3 | import type { ApplicationCommandOptionType } from './shared.ts';
4 |
5 | /**
6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
7 | */
8 | export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase;
9 |
10 | /**
11 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
12 | */
13 | export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<
14 | ApplicationCommandOptionType.User,
15 | Snowflake
16 | >;
17 |
--------------------------------------------------------------------------------
/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts:
--------------------------------------------------------------------------------
1 | import type { InteractionType } from '../../responses';
2 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput';
3 | import type { APIApplicationCommandOptionBase } from './base';
4 | import type { ApplicationCommandOptionType } from './shared';
5 |
6 | export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase {
7 | options?: APIApplicationCommandBasicOption[];
8 | }
9 |
10 | export interface APIApplicationCommandInteractionDataSubcommandOption {
11 | name: string;
12 | type: ApplicationCommandOptionType.Subcommand;
13 | options?: APIApplicationCommandInteractionDataBasicOption[];
14 | }
15 |
--------------------------------------------------------------------------------
/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts:
--------------------------------------------------------------------------------
1 | import type { InteractionType } from '../../responses';
2 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput';
3 | import type { APIApplicationCommandOptionBase } from './base';
4 | import type { ApplicationCommandOptionType } from './shared';
5 |
6 | export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase {
7 | options?: APIApplicationCommandBasicOption[];
8 | }
9 |
10 | export interface APIApplicationCommandInteractionDataSubcommandOption {
11 | name: string;
12 | type: ApplicationCommandOptionType.Subcommand;
13 | options?: APIApplicationCommandInteractionDataBasicOption[];
14 | }
15 |
--------------------------------------------------------------------------------
/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts:
--------------------------------------------------------------------------------
1 | import type { InteractionType } from '../../responses.ts';
2 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
3 | import type { APIApplicationCommandOptionBase } from './base.ts';
4 | import type { ApplicationCommandOptionType } from './shared.ts';
5 |
6 | export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase {
7 | options?: APIApplicationCommandBasicOption[];
8 | }
9 |
10 | export interface APIApplicationCommandInteractionDataSubcommandOption {
11 | name: string;
12 | type: ApplicationCommandOptionType.Subcommand;
13 | options?: APIApplicationCommandInteractionDataBasicOption[];
14 | }
15 |
--------------------------------------------------------------------------------
/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts:
--------------------------------------------------------------------------------
1 | import type { InteractionType } from '../../responses.ts';
2 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
3 | import type { APIApplicationCommandOptionBase } from './base.ts';
4 | import type { ApplicationCommandOptionType } from './shared.ts';
5 |
6 | export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase {
7 | options?: APIApplicationCommandBasicOption[];
8 | }
9 |
10 | export interface APIApplicationCommandInteractionDataSubcommandOption {
11 | name: string;
12 | type: ApplicationCommandOptionType.Subcommand;
13 | options?: APIApplicationCommandInteractionDataBasicOption[];
14 | }
15 |
--------------------------------------------------------------------------------
/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../../../../globals';
2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
3 | import type { ApplicationCommandOptionType } from './shared';
4 |
5 | /**
6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
7 | */
8 | export type APIApplicationCommandAttachmentOption =
9 | APIApplicationCommandOptionBase;
10 |
11 | /**
12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
13 | */
14 | export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<
15 | ApplicationCommandOptionType.Attachment,
16 | Snowflake
17 | >;
18 |
--------------------------------------------------------------------------------
/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../../../../globals';
2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
3 | import type { ApplicationCommandOptionType } from './shared';
4 |
5 | /**
6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
7 | */
8 | export type APIApplicationCommandMentionableOption =
9 | APIApplicationCommandOptionBase;
10 |
11 | /**
12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
13 | */
14 | export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<
15 | ApplicationCommandOptionType.Mentionable,
16 | Snowflake
17 | >;
18 |
--------------------------------------------------------------------------------
/deno/payloads/v10/mod.ts:
--------------------------------------------------------------------------------
1 | export * from '../common.ts';
2 | export * from './application.ts';
3 | export * from './auditLog.ts';
4 | export * from './autoModeration.ts';
5 | export * from './channel.ts';
6 | export type * from './emoji.ts';
7 | export * from './gateway.ts';
8 | export * from './guild.ts';
9 | export * from './guildScheduledEvent.ts';
10 | export * from './interactions.ts';
11 | export * from './invite.ts';
12 | export * from './message.ts';
13 | export * from './monetization.ts';
14 | export * from './oauth2.ts';
15 | export * from './permissions.ts';
16 | export * from './poll.ts';
17 | export type * from './soundboard.ts';
18 | export * from './stageInstance.ts';
19 | export * from './sticker.ts';
20 | export * from './teams.ts';
21 | export type * from './template.ts';
22 | export * from './user.ts';
23 | export type * from './voice.ts';
24 | export * from './webhook.ts';
25 |
--------------------------------------------------------------------------------
/deno/payloads/v9/mod.ts:
--------------------------------------------------------------------------------
1 | export * from '../common.ts';
2 | export * from './application.ts';
3 | export * from './auditLog.ts';
4 | export * from './autoModeration.ts';
5 | export * from './channel.ts';
6 | export type * from './emoji.ts';
7 | export * from './gateway.ts';
8 | export * from './guild.ts';
9 | export * from './guildScheduledEvent.ts';
10 | export * from './interactions.ts';
11 | export * from './invite.ts';
12 | export * from './message.ts';
13 | export * from './monetization.ts';
14 | export * from './oauth2.ts';
15 | export * from './permissions.ts';
16 | export * from './poll.ts';
17 | export type * from './soundboard.ts';
18 | export * from './stageInstance.ts';
19 | export * from './sticker.ts';
20 | export * from './teams.ts';
21 | export type * from './template.ts';
22 | export * from './user.ts';
23 | export type * from './voice.ts';
24 | export * from './webhook.ts';
25 |
--------------------------------------------------------------------------------
/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.ts:
--------------------------------------------------------------------------------
1 | import type { LocalizationMap } from '../../../../../v10';
2 |
3 | /**
4 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
5 | */
6 | export enum ApplicationCommandOptionType {
7 | Subcommand = 1,
8 | SubcommandGroup,
9 | String,
10 | Integer,
11 | Boolean,
12 | User,
13 | Channel,
14 | Role,
15 | Mentionable,
16 | Number,
17 | Attachment,
18 | }
19 |
20 | /**
21 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
22 | */
23 | export interface APIApplicationCommandOptionChoice {
24 | name: string;
25 | name_localizations?: LocalizationMap | null;
26 | value: ValueType;
27 | }
28 |
--------------------------------------------------------------------------------
/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.ts:
--------------------------------------------------------------------------------
1 | import type { LocalizationMap } from '../../../../../v9';
2 |
3 | /**
4 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
5 | */
6 | export enum ApplicationCommandOptionType {
7 | Subcommand = 1,
8 | SubcommandGroup,
9 | String,
10 | Integer,
11 | Boolean,
12 | User,
13 | Channel,
14 | Role,
15 | Mentionable,
16 | Number,
17 | Attachment,
18 | }
19 |
20 | /**
21 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
22 | */
23 | export interface APIApplicationCommandOptionChoice {
24 | name: string;
25 | name_localizations?: LocalizationMap | null;
26 | value: ValueType;
27 | }
28 |
--------------------------------------------------------------------------------
/deno/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../../../../globals.ts';
2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
3 | import type { ApplicationCommandOptionType } from './shared.ts';
4 |
5 | /**
6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
7 | */
8 | export type APIApplicationCommandAttachmentOption =
9 | APIApplicationCommandOptionBase;
10 |
11 | /**
12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
13 | */
14 | export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<
15 | ApplicationCommandOptionType.Attachment,
16 | Snowflake
17 | >;
18 |
--------------------------------------------------------------------------------
/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.ts:
--------------------------------------------------------------------------------
1 | import type { LocalizationMap } from '../../../../../v9.ts';
2 |
3 | /**
4 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
5 | */
6 | export enum ApplicationCommandOptionType {
7 | Subcommand = 1,
8 | SubcommandGroup,
9 | String,
10 | Integer,
11 | Boolean,
12 | User,
13 | Channel,
14 | Role,
15 | Mentionable,
16 | Number,
17 | Attachment,
18 | }
19 |
20 | /**
21 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
22 | */
23 | export interface APIApplicationCommandOptionChoice {
24 | name: string;
25 | name_localizations?: LocalizationMap | null;
26 | value: ValueType;
27 | }
28 |
--------------------------------------------------------------------------------
/payloads/v6/oauth2.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Types extracted from https://discord.com/developers/docs/topics/oauth2
3 | */
4 |
5 | import type { APITeam } from './teams';
6 | import type { APIUser } from './user';
7 |
8 | /**
9 | * https://discord.com/developers/docs/topics/oauth2#get-current-application-information-response-structure
10 | *
11 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
12 | */
13 | export interface APIApplication {
14 | id: string;
15 | name: string;
16 | icon: string | null;
17 | description: string;
18 | rpc_origins?: string[];
19 | bot_public: boolean;
20 | bot_require_code_grant: boolean;
21 | owner: APIUser;
22 | summary: string;
23 | verify_key: string;
24 | team: APITeam | null;
25 | guild_id?: string;
26 | primary_sku_id?: string;
27 | slug?: string;
28 | cover_image?: string;
29 | }
30 |
--------------------------------------------------------------------------------
/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.ts:
--------------------------------------------------------------------------------
1 | import type { LocalizationMap } from '../../../../../v10.ts';
2 |
3 | /**
4 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
5 | */
6 | export enum ApplicationCommandOptionType {
7 | Subcommand = 1,
8 | SubcommandGroup,
9 | String,
10 | Integer,
11 | Boolean,
12 | User,
13 | Channel,
14 | Role,
15 | Mentionable,
16 | Number,
17 | Attachment,
18 | }
19 |
20 | /**
21 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
22 | */
23 | export interface APIApplicationCommandOptionChoice {
24 | name: string;
25 | name_localizations?: LocalizationMap | null;
26 | value: ValueType;
27 | }
28 |
--------------------------------------------------------------------------------
/deno/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../../../../globals.ts';
2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
3 | import type { ApplicationCommandOptionType } from './shared.ts';
4 |
5 | /**
6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
7 | */
8 | export type APIApplicationCommandMentionableOption =
9 | APIApplicationCommandOptionBase;
10 |
11 | /**
12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
13 | */
14 | export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<
15 | ApplicationCommandOptionType.Mentionable,
16 | Snowflake
17 | >;
18 |
--------------------------------------------------------------------------------
/payloads/v6/emoji.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Types extracted from https://discord.com/developers/docs/resources/emoji
3 | */
4 |
5 | import type { APIUser } from './user';
6 |
7 | /**
8 | * Not documented but mentioned
9 | *
10 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
11 | */
12 | export interface APIPartialEmoji {
13 | id: string | null;
14 | name: string | null;
15 | animated?: boolean;
16 | }
17 |
18 | /**
19 | * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
20 | *
21 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
22 | */
23 | export interface APIEmoji extends APIPartialEmoji {
24 | roles?: string[];
25 | user?: APIUser;
26 | require_colons?: boolean;
27 | managed?: boolean;
28 | available?: boolean;
29 | }
30 |
--------------------------------------------------------------------------------
/deno/payloads/v6/emoji.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Types extracted from https://discord.com/developers/docs/resources/emoji
3 | */
4 |
5 | import type { APIUser } from './user.ts';
6 |
7 | /**
8 | * Not documented but mentioned
9 | *
10 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
11 | */
12 | export interface APIPartialEmoji {
13 | id: string | null;
14 | name: string | null;
15 | animated?: boolean;
16 | }
17 |
18 | /**
19 | * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
20 | *
21 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
22 | */
23 | export interface APIEmoji extends APIPartialEmoji {
24 | roles?: string[];
25 | user?: APIUser;
26 | require_colons?: boolean;
27 | managed?: boolean;
28 | available?: boolean;
29 | }
30 |
--------------------------------------------------------------------------------
/deno/payloads/v6/oauth2.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Types extracted from https://discord.com/developers/docs/topics/oauth2
3 | */
4 |
5 | import type { APITeam } from './teams.ts';
6 | import type { APIUser } from './user.ts';
7 |
8 | /**
9 | * https://discord.com/developers/docs/topics/oauth2#get-current-application-information-response-structure
10 | *
11 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
12 | */
13 | export interface APIApplication {
14 | id: string;
15 | name: string;
16 | icon: string | null;
17 | description: string;
18 | rpc_origins?: string[];
19 | bot_public: boolean;
20 | bot_require_code_grant: boolean;
21 | owner: APIUser;
22 | summary: string;
23 | verify_key: string;
24 | team: APITeam | null;
25 | guild_id?: string;
26 | primary_sku_id?: string;
27 | slug?: string;
28 | cover_image?: string;
29 | }
30 |
--------------------------------------------------------------------------------
/rest/v10/auditLog.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../globals';
2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v10/auditLog';
3 |
4 | /**
5 | * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
6 | */
7 | export interface RESTGetAPIAuditLogQuery {
8 | /**
9 | * Filter the log for actions made by a user
10 | */
11 | user_id?: Snowflake;
12 | /**
13 | * The type of audit log events
14 | */
15 | action_type?: AuditLogEvent;
16 | /**
17 | * Filter the log before a certain entry ID
18 | */
19 | before?: Snowflake;
20 | /**
21 | * Filter the log after a certain entry ID
22 | */
23 | after?: Snowflake;
24 | /**
25 | * How many entries are returned (default 50, minimum 1, maximum 100)
26 | *
27 | * @defaultValue `50`
28 | */
29 | limit?: number;
30 | }
31 |
32 | export type RESTGetAPIAuditLogResult = APIAuditLog;
33 |
--------------------------------------------------------------------------------
/rest/v9/auditLog.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../globals';
2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v9/auditLog';
3 |
4 | /**
5 | * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
6 | */
7 | export interface RESTGetAPIAuditLogQuery {
8 | /**
9 | * Filter the log for actions made by a user
10 | */
11 | user_id?: Snowflake;
12 | /**
13 | * The type of audit log events
14 | */
15 | action_type?: AuditLogEvent;
16 | /**
17 | * Filter the log before a certain entry ID
18 | */
19 | before?: Snowflake;
20 | /**
21 | * Filter the log after a certain entry ID
22 | */
23 | after?: Snowflake;
24 | /**
25 | * How many entries are returned (default 50, minimum 1, maximum 100)
26 | *
27 | * @defaultValue `50`
28 | */
29 | limit?: number;
30 | }
31 |
32 | export type RESTGetAPIAuditLogResult = APIAuditLog;
33 |
--------------------------------------------------------------------------------
/deno/rest/v9/auditLog.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../globals.ts';
2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v9/auditLog.ts';
3 |
4 | /**
5 | * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
6 | */
7 | export interface RESTGetAPIAuditLogQuery {
8 | /**
9 | * Filter the log for actions made by a user
10 | */
11 | user_id?: Snowflake;
12 | /**
13 | * The type of audit log events
14 | */
15 | action_type?: AuditLogEvent;
16 | /**
17 | * Filter the log before a certain entry ID
18 | */
19 | before?: Snowflake;
20 | /**
21 | * Filter the log after a certain entry ID
22 | */
23 | after?: Snowflake;
24 | /**
25 | * How many entries are returned (default 50, minimum 1, maximum 100)
26 | *
27 | * @defaultValue `50`
28 | */
29 | limit?: number;
30 | }
31 |
32 | export type RESTGetAPIAuditLogResult = APIAuditLog;
33 |
--------------------------------------------------------------------------------
/deno/rest/v10/auditLog.ts:
--------------------------------------------------------------------------------
1 | import type { Snowflake } from '../../globals.ts';
2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v10/auditLog.ts';
3 |
4 | /**
5 | * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
6 | */
7 | export interface RESTGetAPIAuditLogQuery {
8 | /**
9 | * Filter the log for actions made by a user
10 | */
11 | user_id?: Snowflake;
12 | /**
13 | * The type of audit log events
14 | */
15 | action_type?: AuditLogEvent;
16 | /**
17 | * Filter the log before a certain entry ID
18 | */
19 | before?: Snowflake;
20 | /**
21 | * Filter the log after a certain entry ID
22 | */
23 | after?: Snowflake;
24 | /**
25 | * How many entries are returned (default 50, minimum 1, maximum 100)
26 | *
27 | * @defaultValue `50`
28 | */
29 | limit?: number;
30 | }
31 |
32 | export type RESTGetAPIAuditLogResult = APIAuditLog;
33 |
--------------------------------------------------------------------------------
/tests/v10/onboarding.ts:
--------------------------------------------------------------------------------
1 | import type { APIGuildOnboarding, RESTPutAPIGuildOnboardingJSONBody } from '../../v10';
2 | import { expectAssignable } from '../__utils__/type-assertions';
3 |
4 | declare const onboarding: APIGuildOnboarding;
5 |
6 | expectAssignable({});
7 | expectAssignable(onboarding);
8 | expectAssignable({
9 | default_channel_ids: ['123456789012345678'],
10 | prompts: [
11 | {
12 | id: '123456789012345678',
13 | title: 'This is a title',
14 | options: [
15 | {
16 | title: 'yeet',
17 | emoji_name: '😎',
18 | role_ids: undefined,
19 | },
20 | {
21 | id: '123456789012345678',
22 | title: 'yeet with id',
23 | emoji_id: '123456789012345678',
24 | },
25 | ],
26 | in_onboarding: undefined,
27 | },
28 | ],
29 | enabled: undefined,
30 | });
31 |
--------------------------------------------------------------------------------
/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts:
--------------------------------------------------------------------------------
1 | import type { InteractionType } from '../../responses';
2 | import type { APIApplicationCommandOptionBase } from './base';
3 | import type { ApplicationCommandOptionType } from './shared';
4 | import type {
5 | APIApplicationCommandInteractionDataSubcommandOption,
6 | APIApplicationCommandSubcommandOption,
7 | } from './subcommand';
8 |
9 | export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase {
10 | options?: APIApplicationCommandSubcommandOption[];
11 | }
12 |
13 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption<
14 | Type extends InteractionType = InteractionType,
15 | > {
16 | name: string;
17 | type: ApplicationCommandOptionType.SubcommandGroup;
18 | options: APIApplicationCommandInteractionDataSubcommandOption[];
19 | }
20 |
--------------------------------------------------------------------------------
/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts:
--------------------------------------------------------------------------------
1 | import type { InteractionType } from '../../responses';
2 | import type { APIApplicationCommandOptionBase } from './base';
3 | import type { ApplicationCommandOptionType } from './shared';
4 | import type {
5 | APIApplicationCommandInteractionDataSubcommandOption,
6 | APIApplicationCommandSubcommandOption,
7 | } from './subcommand';
8 |
9 | export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase {
10 | options?: APIApplicationCommandSubcommandOption[];
11 | }
12 |
13 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption<
14 | Type extends InteractionType = InteractionType,
15 | > {
16 | name: string;
17 | type: ApplicationCommandOptionType.SubcommandGroup;
18 | options: APIApplicationCommandInteractionDataSubcommandOption[];
19 | }
20 |
--------------------------------------------------------------------------------
/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts:
--------------------------------------------------------------------------------
1 | import type { InteractionType } from '../../responses.ts';
2 | import type { APIApplicationCommandOptionBase } from './base.ts';
3 | import type { ApplicationCommandOptionType } from './shared.ts';
4 | import type {
5 | APIApplicationCommandInteractionDataSubcommandOption,
6 | APIApplicationCommandSubcommandOption,
7 | } from './subcommand.ts';
8 |
9 | export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase {
10 | options?: APIApplicationCommandSubcommandOption[];
11 | }
12 |
13 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption<
14 | Type extends InteractionType = InteractionType,
15 | > {
16 | name: string;
17 | type: ApplicationCommandOptionType.SubcommandGroup;
18 | options: APIApplicationCommandInteractionDataSubcommandOption[];
19 | }
20 |
--------------------------------------------------------------------------------
/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts:
--------------------------------------------------------------------------------
1 | import type { InteractionType } from '../../responses.ts';
2 | import type { APIApplicationCommandOptionBase } from './base.ts';
3 | import type { ApplicationCommandOptionType } from './shared.ts';
4 | import type {
5 | APIApplicationCommandInteractionDataSubcommandOption,
6 | APIApplicationCommandSubcommandOption,
7 | } from './subcommand.ts';
8 |
9 | export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase {
10 | options?: APIApplicationCommandSubcommandOption[];
11 | }
12 |
13 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption<
14 | Type extends InteractionType = InteractionType,
15 | > {
16 | name: string;
17 | type: ApplicationCommandOptionType.SubcommandGroup;
18 | options: APIApplicationCommandInteractionDataSubcommandOption[];
19 | }
20 |
--------------------------------------------------------------------------------
/website/src/css/tippy-discord.css:
--------------------------------------------------------------------------------
1 | .tippy-box[data-theme~='discord'] {
2 | color: rgba(229, 231, 235, 1);
3 | padding-left: 0.5rem;
4 | padding-right: 0.5rem;
5 | padding-top: 0.25rem;
6 | padding-bottom: 0.25rem;
7 | border-radius: 0.25rem;
8 | background-color: #3ba55c;
9 | }
10 |
11 | .tippy-box[data-theme~='discord'] > .tippy-content {
12 | font-weight: 600;
13 | }
14 |
15 | .tippy-box[data-theme~='discord'][data-placement^='top'] > .tippy-arrow::before {
16 | border-top-color: rgba(59, 165, 92, 1);
17 | }
18 |
19 | .tippy-box[data-theme~='discord'][data-placement^='bottom'] > .tippy-arrow::before {
20 | border-top-color: rgba(59, 165, 92, 1);
21 | }
22 |
23 | .tippy-box[data-theme~='discord'][data-placement^='left'] > .tippy-arrow::before {
24 | border-top-color: rgba(59, 165, 92, 1);
25 | }
26 |
27 | .tippy-box[data-theme~='discord'][data-placement^='right'] > .tippy-arrow::before {
28 | border-top-color: rgba(59, 165, 92, 1);
29 | }
30 |
--------------------------------------------------------------------------------
/.github/workflows/cicd.yml:
--------------------------------------------------------------------------------
1 | name: Continuous Integration / Deployment
2 |
3 | on:
4 | push:
5 | branches:
6 | - '**'
7 | pull_request:
8 |
9 | jobs:
10 | testing:
11 | name: ESLint and TypeScript compilation
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout Project
15 | uses: actions/checkout@v6
16 |
17 | - name: Add problem matcher
18 | run: echo "::add-matcher::.github/problemMatchers/eslint.json" && echo "::add-matcher::.github/problemMatchers/tsc.json"
19 |
20 | - name: Use Node.js
21 | uses: actions/setup-node@v6
22 | with:
23 | cache: 'yarn'
24 | node-version-file: package.json
25 |
26 | - name: Install Dependencies
27 | run: yarn
28 |
29 | - name: Check lint on discord-api-types
30 | run: yarn test:lint
31 |
32 | - name: Run TSC
33 | run: yarn build:ci
34 |
35 | - name: Run Type Tests
36 | run: yarn test:types
37 |
--------------------------------------------------------------------------------
/website/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Discord API Types Website
4 |
5 | **Source code for the Discord API Types website.**
6 |
7 | _Code is forked from the Sapphire Community's Website under the MIT license_
8 |
9 | [](https://github.com/discordjs/discord-api-types/blob/main/website/LICENSE.md)
10 |
11 |