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:
rigormorrtiss
2021-06-15 12:48:06 +04:00
committed by GitHub
parent aad3f038d8
commit 7e1e815ee0
2 changed files with 15 additions and 0 deletions
+3
View File
@@ -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;
}