mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-30 15:30:09 +00:00
feat: stage channels! (#107)
This commit is contained in:
@@ -114,7 +114,7 @@ export enum ChannelType {
|
||||
/**
|
||||
* A text channel within a guild
|
||||
*/
|
||||
GUILD_TEXT = 0,
|
||||
GUILD_TEXT,
|
||||
/**
|
||||
* A direct message between users
|
||||
*/
|
||||
@@ -145,6 +145,12 @@ export enum ChannelType {
|
||||
* See https://discord.com/developers/docs/game-and-server-management/special-channels
|
||||
*/
|
||||
GUILD_STORE,
|
||||
/**
|
||||
* A voice channel for hosting events with an audience
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/1500005513722
|
||||
*/
|
||||
GUILD_STAGE_VOICE = 13,
|
||||
}
|
||||
|
||||
export enum VideoQualityMode {
|
||||
|
||||
@@ -44,6 +44,7 @@ export const PermissionFlagsBits = {
|
||||
MANAGE_WEBHOOKS: 1n << 29n,
|
||||
MANAGE_EMOJIS: 1n << 30n,
|
||||
USE_APPLICATION_COMMANDS: 1n << 31n,
|
||||
REQUEST_TO_SPEAK: 1n << 32n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,6 +59,10 @@ export interface GatewayVoiceState {
|
||||
* Whether this user is muted by the current user
|
||||
*/
|
||||
suppress: boolean;
|
||||
/**
|
||||
* The time at which the user requested to speak
|
||||
*/
|
||||
request_to_speak_timestamp: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -770,3 +770,29 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
}
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean;
|
||||
}
|
||||
|
||||
@@ -626,6 +626,15 @@ export const Routes = {
|
||||
guildMemberVerification(guildID: Snowflake) {
|
||||
return `/guilds/${guildID}/member-verification` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
guildVoiceState(guildID: Snowflake, userID: Snowflake | '@me' = '@me') {
|
||||
return `/guilds/${guildID}/voice-states/${userID}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const RouteBases = {
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts"
|
||||
"{v*,default,common}/**/*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts"
|
||||
},
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
|
||||
@@ -114,7 +114,7 @@ export const enum ChannelType {
|
||||
/**
|
||||
* A text channel within a guild
|
||||
*/
|
||||
GUILD_TEXT = 0,
|
||||
GUILD_TEXT,
|
||||
/**
|
||||
* A direct message between users
|
||||
*/
|
||||
@@ -145,6 +145,12 @@ export const enum ChannelType {
|
||||
* See https://discord.com/developers/docs/game-and-server-management/special-channels
|
||||
*/
|
||||
GUILD_STORE,
|
||||
/**
|
||||
* A voice channel for hosting events with an audience
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/1500005513722
|
||||
*/
|
||||
GUILD_STAGE_VOICE = 13,
|
||||
}
|
||||
|
||||
export const enum VideoQualityMode {
|
||||
|
||||
@@ -44,6 +44,7 @@ export const PermissionFlagsBits = {
|
||||
MANAGE_WEBHOOKS: 1n << 29n,
|
||||
MANAGE_EMOJIS: 1n << 30n,
|
||||
USE_APPLICATION_COMMANDS: 1n << 31n,
|
||||
REQUEST_TO_SPEAK: 1n << 32n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,6 +59,10 @@ export interface GatewayVoiceState {
|
||||
* Whether this user is muted by the current user
|
||||
*/
|
||||
suppress: boolean;
|
||||
/**
|
||||
* The time at which the user requested to speak
|
||||
*/
|
||||
request_to_speak_timestamp: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -770,3 +770,29 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
}
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean;
|
||||
}
|
||||
|
||||
@@ -626,6 +626,15 @@ export const Routes = {
|
||||
guildMemberVerification(guildID: Snowflake) {
|
||||
return `/guilds/${guildID}/member-verification` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
guildVoiceState(guildID: Snowflake, userID: Snowflake | '@me' = '@me') {
|
||||
return `/guilds/${guildID}/voice-states/${userID}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const RouteBases = {
|
||||
|
||||
Reference in New Issue
Block a user