mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
feat(types): add stageInstance field to Invite (#1041)
* feat(types): add stageInstance field to Invite * feat(types): add stageInstance field to Invite * . * Convert members field to an array
This commit is contained in:
@@ -3,6 +3,7 @@ import { Guild } from "../guilds/guild.ts";
|
||||
import { Application } from "../applications/application.ts";
|
||||
import { User } from "../users/user.ts";
|
||||
import { DiscordTargetTypes } from "./target_types.ts";
|
||||
import { InviteStageInstance } from "./invite_stage_instance.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/invite#invite-object */
|
||||
export interface Invite {
|
||||
@@ -26,4 +27,6 @@ export interface Invite {
|
||||
approximateMemberCount?: number;
|
||||
/** The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true` */
|
||||
expiresAt?: string | null;
|
||||
/** Stage instance data if there is a public Stage instance in the Stage channel this invite is for */
|
||||
stageInstance?: InviteStageInstance;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { GuildMember } from "../members/guild_member.ts";
|
||||
|
||||
export interface InviteStageInstance {
|
||||
/** The members speaking in the Stage */
|
||||
members: Partial<GuildMember>[];
|
||||
/** The number of users in the Stage */
|
||||
participantCount: number;
|
||||
/** The number of users speaking in the Stage */
|
||||
speakerCount: number;
|
||||
/** The topic of the Stage instance (1-120 characters) */
|
||||
topic: string;
|
||||
}
|
||||
Reference in New Issue
Block a user