-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add guild scheduled event (#186)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
- Loading branch information
1 parent
f2d62e3
commit d333962
Showing
42 changed files
with
1,550 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import type { APIUser } from './user.ts'; | ||
import type { Snowflake } from '../../globals.ts'; | ||
|
||
export interface APIGuildScheduledEvent { | ||
/** | ||
* The id of the guild event | ||
*/ | ||
id: Snowflake; | ||
/** | ||
* The guild id which the scheduled event belongs to | ||
*/ | ||
guild_id: Snowflake; | ||
/** | ||
* The channel id in which the scheduled event will be hosted, or `null` if entity type is `EXTERNAL` | ||
*/ | ||
channel_id: Snowflake | null; | ||
/** | ||
* The id of the user that created the scheduled event | ||
*/ | ||
creator_id: Snowflake | null; | ||
/** | ||
* The name of the scheduled event | ||
*/ | ||
name: string; | ||
/** | ||
* The description of the scheduled event | ||
*/ | ||
description?: string; | ||
/** | ||
* The time the scheduled event will start | ||
*/ | ||
scheduled_start_time: string; | ||
/** | ||
* The time at which the guild event will end, or `null` if the event does not have a scheduled time to end | ||
*/ | ||
scheduled_end_time: string | null; | ||
/** | ||
* The privacy level of the scheduled event | ||
*/ | ||
privacy_level: GuildScheduledEventPrivacyLevel; | ||
/** | ||
* The status of the scheduled event | ||
*/ | ||
status: GuildScheduledEventStatus; | ||
/** | ||
* The type of hosting entity associated with the scheduled event | ||
*/ | ||
entity_type: GuildScheduledEventEntityType; | ||
/** | ||
* The id of the hosting entity associated with the scheduled event | ||
*/ | ||
entity_id: Snowflake | null; | ||
/** | ||
* The entity metadata for the scheduled event | ||
*/ | ||
entity_metadata: APIGuildScheduledEventEntityMetadata; | ||
/** | ||
* The user that created the scheduled event | ||
*/ | ||
creator?: APIUser; | ||
/** | ||
* The number of users subscribed to the scheduled event | ||
*/ | ||
user_count?: number; | ||
} | ||
|
||
/** | ||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata | ||
*/ | ||
export interface APIGuildScheduledEventEntityMetadata { | ||
/** | ||
* The location of the scheduled event | ||
*/ | ||
location?: string; | ||
} | ||
|
||
/** | ||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types | ||
*/ | ||
export enum GuildScheduledEventEntityType { | ||
StageInstance = 1, | ||
Voice, | ||
External, | ||
} | ||
|
||
/** | ||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status | ||
*/ | ||
export enum GuildScheduledEventStatus { | ||
Scheduled = 1, | ||
Active, | ||
Completed, | ||
Canceled, | ||
} | ||
|
||
/** | ||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level | ||
*/ | ||
export enum GuildScheduledEventPrivacyLevel { | ||
/** | ||
* The scheduled event is only accessible to guild members | ||
*/ | ||
GuildOnly = 2, | ||
} |
Oops, something went wrong.