Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: discordjs/discord-api-types
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.37.43
Choose a base ref
...
head repository: discordjs/discord-api-types
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.37.44
Choose a head ref
  • 3 commits
  • 28 files changed
  • 3 contributors

Commits on Jun 14, 2023

  1. 1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    eced39c View commit details

Commits on Jun 15, 2023

  1. chore(release): 0.37.44 🎉 (#774)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Jun 15, 2023
    1
    Copy the full SHA
    e01cf7c View commit details
  2. 1
    Copy the full SHA
    5af7147 View commit details
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [0.37.44](https://github.com/discordjs/discord-api-types/compare/0.37.43...0.37.44) (2023-06-15)

### Features

- guild onboarding ([#713](https://github.com/discordjs/discord-api-types/issues/713)) ([eced39c](https://github.com/discordjs/discord-api-types/commit/eced39cc3fa305e336d5752827812cb790ac485d))

## [0.37.43](https://github.com/discordjs/discord-api-types/compare/0.37.42...0.37.43) (2023-05-29)

### Features
6 changes: 6 additions & 0 deletions deno/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [0.37.44](https://github.com/discordjs/discord-api-types/compare/0.37.43...0.37.44) (2023-06-15)

### Features

- guild onboarding ([#713](https://github.com/discordjs/discord-api-types/issues/713)) ([eced39c](https://github.com/discordjs/discord-api-types/commit/eced39cc3fa305e336d5752827812cb790ac485d))

## [0.37.43](https://github.com/discordjs/discord-api-types/compare/0.37.42...0.37.43) (2023-05-29)

### Features
97 changes: 96 additions & 1 deletion deno/payloads/v10/guild.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
*/

import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIEmoji } from './emoji.ts';
import type { APIEmoji, APIPartialEmoji } from './emoji.ts';
import type { PresenceUpdateStatus } from './gateway.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APIRole } from './permissions.ts';
@@ -999,3 +999,98 @@ export enum MembershipScreeningFieldType {
*/
Terms = 'TERMS',
}

/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
*/
export interface APIGuildOnboarding {
/**
* Id of the guild this onboarding is part of
*/
guild_id: Snowflake;
/**
* Prompts shown during onboarding and in customize community
*/
prompts: APIGuildOnboardingPrompt[];
/**
* Channel ids that members get opted into automatically
*/
default_channel_ids: Snowflake[];
/**
* Whether onboarding is enabled in the guild
*/
enabled: boolean;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
*/
export interface APIGuildOnboardingPrompt {
/**
* Id of the prompt
*/
id: Snowflake;
/**
* Options available within the prompt
*/
options: APIGuildOnboardingPromptOption[];
/**
* Title of the prompt
*/
title: string;
/**
* Indicates whether users are limited to selecting one option for the prompt
*/
single_select: boolean;
/**
* Indicates whether the prompt is required before a user completes the onboarding flow
*/
required: boolean;
/**
* Indicates whether the prompt is present in the onboarding flow.
* If `false`, the prompt will only appear in the Channels & Roles tab
*/
in_onboarding: boolean;
/**
* Type of prompt
*/
type: GuildOnboardingPromptType;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
*/
export interface APIGuildOnboardingPromptOption {
/**
* Id of the prompt option
*/
id: Snowflake;
/**
* Ids for channels a member is added to when the option is selected
*/
channel_ids: Snowflake[];
/**
* Ids for roles assigned to a member when the option is selected
*/
role_ids: Snowflake[];
/**
* Emoji of the option
*/
emoji: APIPartialEmoji;
/**
* Title of the option
*/
title: string;
/**
* Description of the option
*/
description: string | null;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
*/
export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}
6 changes: 5 additions & 1 deletion deno/payloads/v10/user.ts
Original file line number Diff line number Diff line change
@@ -18,9 +18,13 @@ export interface APIUser {
*/
username: string;
/**
* The user's 4-digit discord-tag
* The user's Discord-tag
*/
discriminator: string;
/**
* The user's display name, if it is set. For bots, this is the application name
*/
global_name: string | null;
/**
* The user's avatar hash
*
97 changes: 96 additions & 1 deletion deno/payloads/v9/guild.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
*/

import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIEmoji } from './emoji.ts';
import type { APIEmoji, APIPartialEmoji } from './emoji.ts';
import type { PresenceUpdateStatus } from './gateway.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APIRole } from './permissions.ts';
@@ -991,3 +991,98 @@ export enum MembershipScreeningFieldType {
*/
Terms = 'TERMS',
}

/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
*/
export interface APIGuildOnboarding {
/**
* Id of the guild this onboarding is part of
*/
guild_id: Snowflake;
/**
* Prompts shown during onboarding and in customize community
*/
prompts: APIGuildOnboardingPrompt[];
/**
* Channel ids that members get opted into automatically
*/
default_channel_ids: Snowflake[];
/**
* Whether onboarding is enabled in the guild
*/
enabled: boolean;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
*/
export interface APIGuildOnboardingPrompt {
/**
* Id of the prompt
*/
id: Snowflake;
/**
* Options available within the prompt
*/
options: APIGuildOnboardingPromptOption[];
/**
* Title of the prompt
*/
title: string;
/**
* Indicates whether users are limited to selecting one option for the prompt
*/
single_select: boolean;
/**
* Indicates whether the prompt is required before a user completes the onboarding flow
*/
required: boolean;
/**
* Indicates whether the prompt is present in the onboarding flow.
* If `false`, the prompt will only appear in the Channels & Roles tab
*/
in_onboarding: boolean;
/**
* Type of prompt
*/
type: GuildOnboardingPromptType;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
*/
export interface APIGuildOnboardingPromptOption {
/**
* Id of the prompt option
*/
id: Snowflake;
/**
* Ids for channels a member is added to when the option is selected
*/
channel_ids: Snowflake[];
/**
* Ids for roles assigned to a member when the option is selected
*/
role_ids: Snowflake[];
/**
* Emoji of the option
*/
emoji: APIPartialEmoji;
/**
* Title of the option
*/
title: string;
/**
* Description of the option
*/
description: string | null;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
*/
export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}
6 changes: 5 additions & 1 deletion deno/payloads/v9/user.ts
Original file line number Diff line number Diff line change
@@ -18,9 +18,13 @@ export interface APIUser {
*/
username: string;
/**
* The user's 4-digit discord-tag
* The user's Discord-tag
*/
discriminator: string;
/**
* The user's display name, if it is set. For bots, this is the application name
*/
global_name: string | null;
/**
* The user's avatar hash
*
6 changes: 6 additions & 0 deletions deno/rest/v10/guild.ts
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import type {
APIGuildIntegration,
APIGuildMember,
APIGuildMembershipScreening,
APIGuildOnboarding,
APIGuildPreview,
APIGuildWelcomeScreen,
APIGuildWidget,
@@ -916,3 +917,8 @@ export type RESTPatchAPIGuildWelcomeScreenJSONBody = Nullable<StrictPartial<APIG
* https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
*/
export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;

/**
* https://discord.com/developers/docs/resources/guild#get-guild-onboarding
*/
export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
18 changes: 14 additions & 4 deletions deno/rest/v10/mod.ts
Original file line number Diff line number Diff line change
@@ -879,6 +879,14 @@ export const Routes = {
guildScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake) {
return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users` as const;
},

/**
* Route for:
* - GET `/guilds/${guild.id}/onboarding`
*/
guildOnboarding(guildId: Snowflake) {
return `/guilds/${guildId}/onboarding` as const;
},
};

export const StickerPackApplicationId = '710982414301790216';
@@ -954,14 +962,16 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/embed/avatars/{user.discriminator % 5}.png`
* - GET `/embed/avatars/{index}.png`
*
* The `userDiscriminator` parameter should be the user discriminator modulo 5 (e.g. 1337 % 5 = 2)
* The value for `index` parameter depends on whether the user is [migrated to the new username system](https://discord.com/developers/docs/change-log#unique-usernames-on-discord).
* For users on the new username system, `index` will be `(user.id >> 22) % 6`.
* For users on the legacy username system, `index` will be `user.discriminator % 5`.
*
* This route supports the extension: PNG
*/
defaultUserAvatar(userDiscriminator: DefaultUserAvatarAssets) {
return `/embed/avatars/${userDiscriminator}.png` as const;
defaultUserAvatar(index: DefaultUserAvatarAssets) {
return `/embed/avatars/${index}.png` as const;
},

/**
6 changes: 6 additions & 0 deletions deno/rest/v9/guild.ts
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import type {
APIGuildIntegration,
APIGuildMember,
APIGuildMembershipScreening,
APIGuildOnboarding,
APIGuildPreview,
APIGuildWelcomeScreen,
APIGuildWidget,
@@ -922,3 +923,8 @@ export type RESTPatchAPIGuildWelcomeScreenJSONBody = Nullable<StrictPartial<APIG
* https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
*/
export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;

/**
* https://discord.com/developers/docs/resources/guild#get-guild-onboarding
*/
export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
18 changes: 14 additions & 4 deletions deno/rest/v9/mod.ts
Original file line number Diff line number Diff line change
@@ -888,6 +888,14 @@ export const Routes = {
guildScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake) {
return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users` as const;
},

/**
* Route for:
* - GET `/guilds/${guild.id}/onboarding`
*/
guildOnboarding(guildId: Snowflake) {
return `/guilds/${guildId}/onboarding` as const;
},
};

export const StickerPackApplicationId = '710982414301790216';
@@ -963,14 +971,16 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/embed/avatars/{user.discriminator % 5}.png`
* - GET `/embed/avatars/{index}.png`
*
* The `userDiscriminator` parameter should be the user discriminator modulo 5 (e.g. 1337 % 5 = 2)
* The value for `index` parameter depends on whether the user is [migrated to the new username system](https://discord.com/developers/docs/change-log#unique-usernames-on-discord).
* For users on the new username system, `index` will be `(user.id >> 22) % 6`.
* For users on the legacy username system, `index` will be `user.discriminator % 5`.
*
* This route supports the extension: PNG
*/
defaultUserAvatar(userDiscriminator: DefaultUserAvatarAssets) {
return `/embed/avatars/${userDiscriminator}.png` as const;
defaultUserAvatar(index: DefaultUserAvatarAssets) {
return `/embed/avatars/${index}.png` as const;
},

/**
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-api-types",
"version": "0.37.43",
"version": "0.37.44",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev",
"exports": {
Loading