diff --git a/util/src/entities/Application.ts b/util/src/entities/Application.ts
new file mode 100644
index 00000000..64b5d2e2
--- /dev/null
+++ b/util/src/entities/Application.ts
@@ -0,0 +1,111 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Guild } from "./Guild";
+import { Team } from "./Team";
+
+@Entity("applications")
+export class Application extends BaseClass {
+ @Column()
+ name: string;
+
+ @Column()
+ icon?: string;
+
+ @Column()
+ description: string;
+
+ @Column("simple-array")
+ rpc_origins?: string[];
+
+ @Column()
+ bot_public: boolean;
+
+ @Column()
+ bot_require_code_grant: boolean;
+
+ @Column()
+ terms_of_service_url?: string;
+
+ @Column()
+ privacy_policy_url?: string;
+
+ @Column()
+ owner_id: string;
+
+ @Column()
+ summary?: string;
+
+ @Column()
+ verify_key: string;
+
+ @Column()
+ team_id: string;
+
+ @JoinColumn({ name: "team_id" })
+ @ManyToOne(() => Team, (team: Team) => team.id)
+ team?: Team;
+
+ @Column()
+ guild_id: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild: Guild; // if this application is a game sold, this field will be the guild to which it has been linked
+
+ @Column()
+ primary_sku_id?: string; // if this application is a game sold, this field will be the id of the "Game SKU" that is created,
+
+ @Column()
+ slug?: string; // if this application is a game sold, this field will be the URL slug that links to the store page
+
+ @Column()
+ cover_image?: string; // the application's default rich presence invite cover image hash
+
+ @Column()
+ flags: number; // the application's public flags
+}
+
+export interface ApplicationCommand {
+ id: string;
+ application_id: string;
+ name: string;
+ description: string;
+ options?: ApplicationCommandOption[];
+}
+
+export interface ApplicationCommandOption {
+ type: ApplicationCommandOptionType;
+ name: string;
+ description: string;
+ required?: boolean;
+ choices?: ApplicationCommandOptionChoice[];
+ options?: ApplicationCommandOption[];
+}
+
+export interface ApplicationCommandOptionChoice {
+ name: string;
+ value: string | number;
+}
+
+export enum ApplicationCommandOptionType {
+ SUB_COMMAND = 1,
+ SUB_COMMAND_GROUP = 2,
+ STRING = 3,
+ INTEGER = 4,
+ BOOLEAN = 5,
+ USER = 6,
+ CHANNEL = 7,
+ ROLE = 8,
+}
+
+export interface ApplicationCommandInteractionData {
+ id: string;
+ name: string;
+ options?: ApplicationCommandInteractionDataOption[];
+}
+
+export interface ApplicationCommandInteractionDataOption {
+ name: string;
+ value?: any;
+ options?: ApplicationCommandInteractionDataOption[];
+}
diff --git a/util/src/entities/AuditLog.ts b/util/src/entities/AuditLog.ts
new file mode 100644
index 00000000..53e99261
--- /dev/null
+++ b/util/src/entities/AuditLog.ts
@@ -0,0 +1,147 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { ChannelPermissionOverwrite } from "./Channel";
+import { User } from "./User";
+
+export enum AuditLogEvents {
+ GUILD_UPDATE = 1,
+ CHANNEL_CREATE = 10,
+ CHANNEL_UPDATE = 11,
+ CHANNEL_DELETE = 12,
+ CHANNEL_OVERWRITE_CREATE = 13,
+ CHANNEL_OVERWRITE_UPDATE = 14,
+ CHANNEL_OVERWRITE_DELETE = 15,
+ MEMBER_KICK = 20,
+ MEMBER_PRUNE = 21,
+ MEMBER_BAN_ADD = 22,
+ MEMBER_BAN_REMOVE = 23,
+ MEMBER_UPDATE = 24,
+ MEMBER_ROLE_UPDATE = 25,
+ MEMBER_MOVE = 26,
+ MEMBER_DISCONNECT = 27,
+ BOT_ADD = 28,
+ ROLE_CREATE = 30,
+ ROLE_UPDATE = 31,
+ ROLE_DELETE = 32,
+ INVITE_CREATE = 40,
+ INVITE_UPDATE = 41,
+ INVITE_DELETE = 42,
+ WEBHOOK_CREATE = 50,
+ WEBHOOK_UPDATE = 51,
+ WEBHOOK_DELETE = 52,
+ EMOJI_CREATE = 60,
+ EMOJI_UPDATE = 61,
+ EMOJI_DELETE = 62,
+ MESSAGE_DELETE = 72,
+ MESSAGE_BULK_DELETE = 73,
+ MESSAGE_PIN = 74,
+ MESSAGE_UNPIN = 75,
+ INTEGRATION_CREATE = 80,
+ INTEGRATION_UPDATE = 81,
+ INTEGRATION_DELETE = 82,
+}
+
+@Entity("audit_logs")
+export class AuditLogEntry extends BaseClass {
+ @Column()
+ target_id: string;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ target?: User;
+
+ @Column()
+ user_id: string;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ user: User;
+
+ @Column({
+ type: "simple-enum",
+ enum: AuditLogEvents,
+ })
+ action_type: AuditLogEvents;
+
+ @Column("simple-json")
+ options?: {
+ delete_member_days?: string;
+ members_removed?: string;
+ channel_id?: string;
+ messaged_id?: string;
+ count?: string;
+ id?: string;
+ type?: string;
+ role_name?: string;
+ };
+
+ @Column()
+ @Column("simple-json")
+ changes: AuditLogChange[];
+
+ @Column()
+ reason?: string;
+}
+
+export interface AuditLogChange {
+ new_value?: AuditLogChangeValue;
+ old_value?: AuditLogChangeValue;
+ key: string;
+}
+
+export interface AuditLogChangeValue {
+ name?: string;
+ description?: string;
+ icon_hash?: string;
+ splash_hash?: string;
+ discovery_splash_hash?: string;
+ banner_hash?: string;
+ owner_id?: string;
+ region?: string;
+ preferred_locale?: string;
+ afk_channel_id?: string;
+ afk_timeout?: number;
+ rules_channel_id?: string;
+ public_updates_channel_id?: string;
+ mfa_level?: number;
+ verification_level?: number;
+ explicit_content_filter?: number;
+ default_message_notifications?: number;
+ vanity_url_code?: string;
+ $add?: {}[];
+ $remove?: {}[];
+ prune_delete_days?: number;
+ widget_enabled?: boolean;
+ widget_channel_id?: string;
+ system_channel_id?: string;
+ position?: number;
+ topic?: string;
+ bitrate?: number;
+ permission_overwrites?: ChannelPermissionOverwrite[];
+ nsfw?: boolean;
+ application_id?: string;
+ rate_limit_per_user?: number;
+ permissions?: string;
+ color?: number;
+ hoist?: boolean;
+ mentionable?: boolean;
+ allow?: string;
+ deny?: string;
+ code?: string;
+ channel_id?: string;
+ inviter_id?: string;
+ max_uses?: number;
+ uses?: number;
+ max_age?: number;
+ temporary?: boolean;
+ deaf?: boolean;
+ mute?: boolean;
+ nick?: string;
+ avatar_hash?: string;
+ id?: string;
+ type?: number;
+ enable_emoticons?: boolean;
+ expire_behavior?: number;
+ expire_grace_period?: number;
+ user_limit?: number;
+}
diff --git a/util/src/entities/Ban.ts b/util/src/entities/Ban.ts
new file mode 100644
index 00000000..ceea4a05
--- /dev/null
+++ b/util/src/entities/Ban.ts
@@ -0,0 +1,34 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Guild } from "./Guild";
+import { User } from "./User";
+
+@Entity("bans")
+export class Ban extends BaseClass {
+ @Column()
+ user_id: string;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ user: User;
+
+ @Column()
+ guild_id: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild: Guild;
+
+ @Column()
+ executor_id: string;
+
+ @JoinColumn({ name: "executor_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ executor: User;
+
+ @Column()
+ ip: string;
+
+ @Column()
+ reason?: string;
+}
diff --git a/util/src/entities/BaseClass.ts b/util/src/entities/BaseClass.ts
new file mode 100644
index 00000000..38f6a71b
--- /dev/null
+++ b/util/src/entities/BaseClass.ts
@@ -0,0 +1,61 @@
+import "reflect-metadata";
+import { BaseEntity, BeforeInsert, BeforeUpdate, PrimaryColumn } from "typeorm";
+import { Snowflake } from "../util/Snowflake";
+import Ajv, { ValidateFunction } from "ajv";
+import schema from "./schema.json";
+
+const ajv = new Ajv({
+ removeAdditional: "all",
+ useDefaults: true,
+ coerceTypes: true,
+ validateFormats: false,
+ allowUnionTypes: true,
+});
+// const validator = ajv.compile<BaseClass>(schema);
+
+export class BaseClass extends BaseEntity {
+ @PrimaryColumn()
+ id: string;
+
+ // @ts-ignore
+ constructor(props?: any, public opts: { id?: string } = {}) {
+ super();
+ this.assign(props);
+
+ if (!this.construct.schema) this.construct.schema = { ...schema, $ref: `#/definitions/${this.construct.name}` };
+ }
+
+ get construct(): any {
+ return this.constructor;
+ }
+
+ assign(props: any) {
+ if (!props || typeof props !== "object") return;
+
+ delete props.opts;
+
+ for (const key in props) {
+ if (this.hasOwnProperty(key)) continue;
+
+ Object.defineProperty(this, key, { value: props[key] });
+ }
+
+ this.id = this.opts.id || Snowflake.generate();
+ }
+
+ @BeforeUpdate()
+ @BeforeInsert()
+ validate() {
+ const valid = ajv.validate(this.construct.schema, this.toJSON());
+ if (!valid) throw ajv.errors;
+ }
+
+ get metadata() {
+ return this.construct.getRepository().metadata;
+ }
+
+ toJSON(): any {
+ // @ts-ignore
+ return Object.fromEntries(this.metadata.columns.map((x) => [x.propertyName, this[x.propertyName]]));
+ }
+}
diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts
new file mode 100644
index 00000000..5845607a
--- /dev/null
+++ b/util/src/entities/Channel.ts
@@ -0,0 +1,104 @@
+import { Column, Entity, JoinColumn, ManyToMany, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Guild } from "./Guild";
+import { Message } from "./Message";
+import { User } from "./User";
+
+export enum ChannelType {
+ GUILD_TEXT = 0, // a text channel within a server
+ DM = 1, // a direct message between users
+ GUILD_VOICE = 2, // a voice channel within a server
+ GROUP_DM = 3, // a direct message between multiple users
+ GUILD_CATEGORY = 4, // an organizational category that contains up to 50 channels
+ GUILD_NEWS = 5, // a channel that users can follow and crosspost into their own server
+ GUILD_STORE = 6, // a channel in which game developers can sell their game on Discord
+}
+
+@Entity("channels")
+export class Channel extends BaseClass {
+ @Column()
+ created_at: Date;
+
+ @Column()
+ name: string;
+
+ @Column({ type: "simple-enum", enum: ChannelType })
+ type: ChannelType;
+
+ @Column("simple-array")
+ recipient_ids: string[];
+
+ @JoinColumn({ name: "recipient_ids" })
+ @ManyToMany(() => User, (user: User) => user.id)
+ recipients?: User[];
+
+ @Column()
+ last_message_id: string;
+
+ @JoinColumn({ name: "last_message_id" })
+ @ManyToOne(() => Message, (message: Message) => message.id)
+ last_message?: Message;
+
+ @Column()
+ guild_id?: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild: Guild;
+
+ @Column()
+ parent_id: string;
+
+ @JoinColumn({ name: "parent_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ parent?: Channel;
+
+ @Column()
+ owner_id: string;
+
+ @JoinColumn({ name: "owner_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ owner: User;
+
+ @Column()
+ last_pin_timestamp?: number;
+
+ @Column()
+ default_auto_archive_duration?: number;
+
+ @Column()
+ position: number;
+
+ @Column("simple-json")
+ permission_overwrites: ChannelPermissionOverwrite[];
+
+ @Column()
+ video_quality_mode?: number;
+
+ @Column()
+ bitrate?: number;
+
+ @Column()
+ user_limit?: number;
+
+ @Column()
+ nsfw: boolean;
+
+ @Column()
+ rate_limit_per_user: number;
+
+ @Column()
+ topic?: string;
+}
+
+export interface ChannelPermissionOverwrite {
+ allow: bigint; // for bitfields we use bigints
+ deny: bigint; // for bitfields we use bigints
+ id: string;
+ type: ChannelPermissionOverwriteType;
+}
+
+export enum ChannelPermissionOverwriteType {
+ role = 0,
+ member = 1,
+}
diff --git a/util/src/entities/ConnectedAccount.ts b/util/src/entities/ConnectedAccount.ts
new file mode 100644
index 00000000..6aa2b401
--- /dev/null
+++ b/util/src/entities/ConnectedAccount.ts
@@ -0,0 +1,29 @@
+import { Column, Entity } from "typeorm";
+import { BaseClass } from "./BaseClass";
+
+@Entity("connected_accounts")
+export class ConnectedAccount extends BaseClass {
+ @Column()
+ access_token: string;
+
+ @Column()
+ friend_sync: boolean;
+
+ @Column()
+ name: string;
+
+ @Column()
+ revoked: boolean;
+
+ @Column()
+ show_activity: boolean;
+
+ @Column()
+ type: string;
+
+ @Column()
+ verifie: boolean;
+
+ @Column()
+ visibility: number;
+}
diff --git a/util/src/entities/Emoji.ts b/util/src/entities/Emoji.ts
new file mode 100644
index 00000000..366549db
--- /dev/null
+++ b/util/src/entities/Emoji.ts
@@ -0,0 +1,39 @@
+import { Column, Entity, JoinColumn, ManyToMany, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Guild } from "./Guild";
+import { Role } from "./Role";
+
+@Entity("emojis")
+export class Emoji extends BaseClass {
+ @Column()
+ animated: boolean;
+
+ @Column()
+ available: boolean;
+
+ @Column()
+ guild_id: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild: Guild;
+
+ @Column()
+ managed: boolean;
+
+ @Column()
+ name: string;
+
+ @Column()
+ require_colons: boolean;
+
+ @Column()
+ url: string;
+
+ @Column("simple-array")
+ role_ids: string[];
+
+ @JoinColumn({ name: "role_ids" })
+ @ManyToMany(() => Role, (role: Role) => role.id)
+ roles: Role[]; // roles this emoji is whitelisted to (new discord feature?)
+}
diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts
new file mode 100644
index 00000000..d46d31bc
--- /dev/null
+++ b/util/src/entities/Guild.ts
@@ -0,0 +1,179 @@
+import { Column, Entity, JoinColumn, ManyToMany, ManyToOne, OneToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Channel } from "./Channel";
+import { Emoji } from "./Emoji";
+import { Invite } from "./Invite";
+import { Member } from "./Member";
+import { Role } from "./Role";
+import { User } from "./User";
+import { VoiceState } from "./VoiceState";
+
+@Entity("guilds")
+export class Guild extends BaseClass {
+ @Column()
+ afk_channel_id?: string;
+
+ @JoinColumn({ name: "afk_channel_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ afk_channel?: Channel;
+
+ @Column()
+ afk_timeout?: number;
+
+ // * commented out -> use owner instead
+ // application id of the guild creator if it is bot-created
+ // @Column()
+ // application?: string;
+
+ @Column()
+ banner?: string;
+
+ @Column()
+ default_message_notifications?: number;
+
+ @Column()
+ description?: string;
+
+ @Column()
+ discovery_splash?: string;
+
+ @Column()
+ explicit_content_filter?: number;
+
+ @Column("simple-array")
+ features: string[];
+
+ @Column()
+ icon?: string;
+
+ @Column()
+ large?: boolean;
+
+ @Column()
+ max_members?: number; // e.g. default 100.000
+
+ @Column()
+ max_presences?: number;
+
+ @Column()
+ max_video_channel_users?: number; // ? default: 25, is this max 25 streaming or watching
+
+ @Column()
+ member_count?: number;
+
+ @Column()
+ presence_count?: number; // users online
+
+ @Column("simple-array")
+ member_ids: string[];
+
+ @JoinColumn({ name: "member_ids" })
+ @ManyToMany(() => Member, (member: Member) => member.id)
+ members: Member[];
+
+ @Column("simple-array")
+ role_ids: string[];
+
+ @JoinColumn({ name: "role_ids" })
+ @ManyToMany(() => Role, (role: Role) => role.id)
+ roles: Role[];
+
+ @Column("simple-array")
+ channel_ids: string[];
+
+ @JoinColumn({ name: "channel_ids" })
+ @ManyToMany(() => Channel, (channel: Channel) => channel.id)
+ channels: Channel[];
+
+ @Column("simple-array")
+ emoji_ids: string[];
+
+ @JoinColumn({ name: "emoji_ids" })
+ @ManyToMany(() => Emoji, (emoji: Emoji) => emoji.id)
+ emojis: Emoji[];
+
+ @Column("simple-array")
+ voice_state_ids: string[];
+
+ @JoinColumn({ name: "voice_state_ids" })
+ @ManyToMany(() => VoiceState, (voicestate: VoiceState) => voicestate.id)
+ voice_states: VoiceState[];
+
+ @Column()
+ mfa_level?: number;
+
+ @Column()
+ name: string;
+
+ @Column()
+ owner_id: string;
+
+ @JoinColumn({ name: "owner_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ owner: User;
+
+ @Column()
+ preferred_locale?: string; // only community guilds can choose this
+
+ @Column()
+ premium_subscription_count?: number;
+
+ @Column()
+ premium_tier?: number; // nitro boost level
+
+ @JoinColumn({ name: "public_updates_channel_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ public_updates_channel?: Channel;
+
+ @Column()
+ rules_channel_id?: string;
+
+ @JoinColumn({ name: "rules_channel_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ rules_channel?: string;
+
+ @Column()
+ region?: string;
+
+ @Column()
+ splash?: string;
+
+ @Column()
+ system_channel_id?: string;
+
+ @JoinColumn({ name: "system_channel_id" })
+ @ManyToMany(() => Channel, (channel: Channel) => channel.id)
+ system_channel?: Channel;
+
+ @Column()
+ system_channel_flags?: number;
+
+ @Column()
+ unavailable?: boolean;
+
+ @JoinColumn({ name: "vanity_url_code" })
+ @OneToOne(() => Invite, (invite: Invite) => invite.code)
+ vanity_url?: Invite;
+
+ @Column()
+ verification_level?: number;
+
+ @Column("simple-json")
+ welcome_screen: {
+ enabled: boolean;
+ description: string;
+ welcome_channels: {
+ description: string;
+ emoji_id?: string;
+ emoji_name: string;
+ channel_id: string;
+ }[];
+ };
+
+ @JoinColumn({ name: "widget_channel_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ widget_channel?: Channel;
+
+ @Column()
+ widget_enabled?: boolean;
+}
diff --git a/util/src/entities/Invite.ts b/util/src/entities/Invite.ts
new file mode 100644
index 00000000..19f7206a
--- /dev/null
+++ b/util/src/entities/Invite.ts
@@ -0,0 +1,60 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Channel } from "./Channel";
+import { Guild } from "./Guild";
+import { User } from "./User";
+
+@Entity("invites")
+export class Invite extends BaseClass {
+ @Column()
+ code: string;
+
+ @Column()
+ temporary: boolean;
+
+ @Column()
+ uses: number;
+
+ @Column()
+ max_uses: number;
+
+ @Column()
+ max_age: number;
+
+ @Column()
+ created_at: Date;
+
+ @Column()
+ expires_at: Date;
+
+ @Column()
+ guild_id: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild: Guild;
+
+ @Column()
+ channel_id: string;
+
+ @JoinColumn({ name: "channel_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ channel: Channel;
+
+ @Column()
+ inviter_id: string;
+
+ @JoinColumn({ name: "inviter_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ inviter: User;
+
+ @Column()
+ target_usser_id: string;
+
+ @JoinColumn({ name: "target_user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ target_user?: string; // could be used for "User specific invites" https://github.com/fosscord/fosscord/issues/62
+
+ @Column()
+ target_user_type?: number;
+}
diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts
new file mode 100644
index 00000000..c367755e
--- /dev/null
+++ b/util/src/entities/Member.ts
@@ -0,0 +1,87 @@
+import { PublicUser, User } from "./User";
+import { BaseClass } from "./BaseClass";
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { Guild } from "./Guild";
+
+@Entity("members")
+export class Member extends BaseClass {
+ @Column()
+ user_id: string;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ user: User;
+
+ @Column()
+ guild_id: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild: Guild;
+
+ @Column()
+ nick?: string;
+
+ @Column("simple-array")
+ roles: string[];
+
+ @Column()
+ joined_at: Date;
+
+ @Column()
+ premium_since?: number;
+
+ @Column()
+ deaf: boolean;
+
+ @Column()
+ mute: boolean;
+
+ @Column()
+ pending: boolean;
+
+ @Column("simple-json")
+ settings: UserGuildSettings;
+
+ // TODO: update
+ @Column("simple-json")
+ read_state: Record<string, string | null>;
+}
+
+export interface UserGuildSettings {
+ channel_overrides: {
+ channel_id: string;
+ message_notifications: number;
+ mute_config: MuteConfig;
+ muted: boolean;
+ }[];
+ message_notifications: number;
+ mobile_push: boolean;
+ mute_config: MuteConfig;
+ muted: boolean;
+ suppress_everyone: boolean;
+ suppress_roles: boolean;
+ version: number;
+}
+
+export interface MuteConfig {
+ end_time: number;
+ selected_time_window: number;
+}
+
+// @ts-ignore
+export interface PublicMember extends Omit<Member, "settings" | "id" | "read_state"> {
+ user: PublicUser;
+}
+
+export const PublicMemberProjection = {
+ id: true,
+ guild_id: true,
+ nick: true,
+ roles: true,
+ joined_at: true,
+ pending: true,
+ deaf: true,
+ mute: true,
+ premium_since: true,
+};
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts
new file mode 100644
index 00000000..2c0918c7
--- /dev/null
+++ b/util/src/entities/Message.ts
@@ -0,0 +1,260 @@
+import { User } from "./User";
+import { Member } from "./Member";
+import { Role } from "./Role";
+import { Channel } from "./Channel";
+import { InteractionType } from "../interfaces/Interaction";
+import { Application } from "./Application";
+import { Column, CreateDateColumn, Entity, JoinColumn, ManyToMany, ManyToOne, UpdateDateColumn } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Guild } from "./Guild";
+import { Webhook } from "./Webhook";
+
+export enum MessageType {
+ DEFAULT = 0,
+ RECIPIENT_ADD = 1,
+ RECIPIENT_REMOVE = 2,
+ CALL = 3,
+ CHANNEL_NAME_CHANGE = 4,
+ CHANNEL_ICON_CHANGE = 5,
+ CHANNEL_PINNED_MESSAGE = 6,
+ GUILD_MEMBER_JOIN = 7,
+ USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
+ CHANNEL_FOLLOW_ADD = 12,
+ GUILD_DISCOVERY_DISQUALIFIED = 14,
+ GUILD_DISCOVERY_REQUALIFIED = 15,
+ REPLY = 19,
+ APPLICATION_COMMAND = 20,
+}
+
+@Entity("messages")
+export class Message extends BaseClass {
+ @Column()
+ id: string;
+
+ @Column()
+ channel_id: string;
+
+ @JoinColumn({ name: "channel_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ channel: Channel;
+
+ @Column()
+ guild_id: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild?: Guild;
+
+ @Column()
+ author_id: string;
+
+ @JoinColumn({ name: "author_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ author?: User;
+
+ @Column()
+ member_id: string;
+
+ @JoinColumn({ name: "member_id" })
+ @ManyToOne(() => Member, (member: Member) => member.id)
+ member?: Member;
+
+ @Column()
+ webhook_id: string;
+
+ @JoinColumn({ name: "webhook_id" })
+ @ManyToOne(() => Webhook, (webhook: Webhook) => webhook.id)
+ webhook?: Webhook;
+
+ @Column()
+ application_id: string;
+
+ @JoinColumn({ name: "application_id" })
+ @ManyToOne(() => Application, (application: Application) => application.id)
+ application?: Application;
+
+ @Column()
+ content?: string;
+
+ @Column()
+ @CreateDateColumn()
+ timestamp: Date;
+
+ @Column()
+ @UpdateDateColumn()
+ edited_timestamp?: Date;
+
+ @Column()
+ tts?: boolean;
+
+ @Column()
+ mention_everyone?: boolean;
+
+ @Column("simple-array")
+ mention_user_ids: string[];
+
+ @JoinColumn({ name: "mention_user_ids" })
+ @ManyToMany(() => User, (user: User) => user.id)
+ mention_users: User[];
+
+ @Column("simple-array")
+ mention_role_ids: string[];
+
+ @JoinColumn({ name: "mention_role_ids" })
+ @ManyToMany(() => Role, (role: Role) => role.id)
+ mention_roles: Role[];
+
+ @Column("simple-array")
+ mention_channel_ids: string[];
+
+ @JoinColumn({ name: "mention_channel_ids" })
+ @ManyToMany(() => Channel, (channel: Channel) => channel.id)
+ mention_channels: Channel[];
+
+ @Column("simple-json")
+ attachments: Attachment[];
+
+ @Column("simple-json")
+ embeds: Embed[];
+
+ @Column("simple-json")
+ reactions: Reaction[];
+
+ @Column({ type: "text" })
+ nonce?: string | number;
+
+ @Column()
+ pinned?: boolean;
+
+ @Column({ type: "simple-enum", enum: MessageType })
+ type: MessageType;
+
+ @Column("simple-json")
+ activity?: {
+ type: number;
+ party_id: string;
+ };
+
+ @Column({ type: "bigint" })
+ flags?: bigint;
+
+ @Column("simple-json")
+ stickers?: any[];
+
+ @Column("simple-json")
+ message_reference?: {
+ message_id: string;
+ channel_id?: string;
+ guild_id?: string;
+ };
+
+ @Column("simple-json")
+ interaction?: {
+ id: string;
+ type: InteractionType;
+ name: string;
+ user_id: string; // the user who invoked the interaction
+ // user: User; // TODO: autopopulate user
+ };
+
+ @Column("simple-json")
+ components: MessageComponent[];
+}
+
+export interface MessageComponent {
+ type: number;
+ style?: number;
+ label?: string;
+ emoji?: PartialEmoji;
+ custom_id?: string;
+ url?: string;
+ disabled?: boolean;
+ components: MessageComponent[];
+}
+
+export enum MessageComponentType {
+ ActionRow = 1,
+ Button = 2,
+}
+
+export interface Attachment {
+ id: string; // attachment id
+ filename: string; // name of file attached
+ size: number; // size of file in bytes
+ url: string; // source url of file
+ proxy_url: string; // a proxied url of file
+ height?: number; // height of file (if image)
+ width?: number; // width of file (if image)
+ content_type?: string;
+}
+
+export interface Embed {
+ title?: string; //title of embed
+ type?: EmbedType; // type of embed (always "rich" for webhook embeds)
+ description?: string; // description of embed
+ url?: string; // url of embed
+ timestamp?: Date; // timestamp of embed content
+ color?: number; // color code of the embed
+ footer?: {
+ text: string;
+ icon_url?: string;
+ proxy_icon_url?: string;
+ }; // footer object footer information
+ image?: EmbedImage; // image object image information
+ thumbnail?: EmbedImage; // thumbnail object thumbnail information
+ video?: EmbedImage; // video object video information
+ provider?: {
+ name?: string;
+ url?: string;
+ }; // provider object provider information
+ author?: {
+ name?: string;
+ url?: string;
+ icon_url?: string;
+ proxy_icon_url?: string;
+ }; // author object author information
+ fields?: {
+ name: string;
+ value: string;
+ inline?: boolean;
+ }[];
+}
+
+export enum EmbedType {
+ rich = "rich",
+ image = "image",
+ video = "video",
+ gifv = "gifv",
+ article = "article",
+ link = "link",
+}
+
+export interface EmbedImage {
+ url?: string;
+ proxy_url?: string;
+ height?: number;
+ width?: number;
+}
+
+export interface Reaction {
+ count: number;
+ //// not saved in the database // me: boolean; // whether the current user reacted using this emoji
+ emoji: PartialEmoji;
+ user_ids: string[];
+}
+
+export interface PartialEmoji {
+ id?: string;
+ name: string;
+ animated?: boolean;
+}
+
+export interface AllowedMentions {
+ parse?: ("users" | "roles" | "everyone")[];
+ roles?: string[];
+ users?: string[];
+ replied_user?: boolean;
+}
diff --git a/util/src/entities/RateLimit.ts b/util/src/entities/RateLimit.ts
new file mode 100644
index 00000000..374a0759
--- /dev/null
+++ b/util/src/entities/RateLimit.ts
@@ -0,0 +1,25 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { User } from "./User";
+
+@Entity("rate_limits")
+export class RateLimit extends BaseClass {
+ @Column()
+ id: "global" | "error" | string; // channel_239842397 | guild_238927349823 | webhook_238923423498
+
+ @Column()
+ user_id: string;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user) => user.id)
+ user: User;
+
+ @Column()
+ hits: number;
+
+ @Column()
+ blocked: boolean;
+
+ @Column()
+ expires_at: Date;
+}
diff --git a/util/src/entities/ReadState.ts b/util/src/entities/ReadState.ts
new file mode 100644
index 00000000..7c56b6c6
--- /dev/null
+++ b/util/src/entities/ReadState.ts
@@ -0,0 +1,35 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Channel } from "./Channel";
+import { Message } from "./Message";
+import { User } from "./User";
+
+@Entity("read_states")
+export class ReadState extends BaseClass {
+ @Column()
+ channel_id: string;
+
+ @JoinColumn({ name: "channel_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ channel: Channel;
+
+ @Column()
+ user_id: string;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ user: User;
+
+ @JoinColumn({ name: "last_message_id" })
+ @ManyToOne(() => Message, (message: Message) => message.id)
+ last_message?: Message;
+
+ @Column()
+ last_pin_timestamp?: Date;
+
+ @Column()
+ mention_count: number;
+
+ @Column()
+ manual: boolean;
+}
diff --git a/util/src/entities/Relationship.ts b/util/src/entities/Relationship.ts
new file mode 100644
index 00000000..bd5861f0
--- /dev/null
+++ b/util/src/entities/Relationship.ts
@@ -0,0 +1,26 @@
+import { Column, Entity, JoinColumn, ManyToOne, OneToMany } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { User } from "./User";
+
+export enum RelationshipType {
+ outgoing = 4,
+ incoming = 3,
+ blocked = 2,
+ friends = 1,
+}
+
+@Entity("relationships")
+export class Relationship extends BaseClass {
+ @Column()
+ user_id: string;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ user: User;
+
+ @Column()
+ nickname?: string;
+
+ @Column({ type: "simple-enum", enum: RelationshipType })
+ type: RelationshipType;
+}
diff --git a/util/src/entities/Role.ts b/util/src/entities/Role.ts
new file mode 100644
index 00000000..7bb144cc
--- /dev/null
+++ b/util/src/entities/Role.ts
@@ -0,0 +1,41 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Guild } from "./Guild";
+
+@Entity("roles")
+export class Role extends BaseClass {
+ @Column()
+ guild_id: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild: Guild;
+
+ @Column()
+ color: number;
+
+ @Column()
+ hoist: boolean;
+
+ @Column()
+ managed: boolean;
+
+ @Column()
+ mentionable: boolean;
+
+ @Column()
+ name: string;
+
+ @Column({ type: "bigint" })
+ permissions: bigint;
+
+ @Column()
+ position: number;
+
+ @Column({ type: "simple-json" })
+ tags?: {
+ bot_id?: string;
+ integration_id?: string;
+ premium_subscriber?: boolean;
+ };
+}
diff --git a/util/src/entities/Team.ts b/util/src/entities/Team.ts
new file mode 100644
index 00000000..5e645650
--- /dev/null
+++ b/util/src/entities/Team.ts
@@ -0,0 +1,27 @@
+import { Column, Entity, JoinColumn, ManyToMany, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { TeamMember } from "./TeamMember";
+import { User } from "./User";
+
+@Entity("teams")
+export class Team extends BaseClass {
+ @Column()
+ icon?: string;
+
+ @Column("simple-array")
+ member_ids: string[];
+
+ @JoinColumn({ name: "member_ids" })
+ @ManyToMany(() => TeamMember, (member: TeamMember) => member.id)
+ members: TeamMember[];
+
+ @Column()
+ name: string;
+
+ @Column()
+ owner_user_id: string;
+
+ @JoinColumn({ name: "owner_user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ owner_user: User;
+}
diff --git a/util/src/entities/TeamMember.ts b/util/src/entities/TeamMember.ts
new file mode 100644
index 00000000..2b1c76f1
--- /dev/null
+++ b/util/src/entities/TeamMember.ts
@@ -0,0 +1,31 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { User } from "./User";
+
+export enum TeamMemberState {
+ INVITED = 1,
+ ACCEPTED = 2,
+}
+
+@Entity("team_members")
+export class TeamMember extends BaseClass {
+ @Column({ type: "simple-enum", enum: TeamMemberState })
+ membership_state: TeamMemberState;
+
+ @Column("simple-array")
+ permissions: string[];
+
+ @Column()
+ team_id: string;
+
+ @JoinColumn({ name: "team_id" })
+ @ManyToOne(() => require("./Team").Team, (team: import("./Team").Team) => team.id)
+ team: import("./Team").Team;
+
+ @Column()
+ user_id: string;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ user: User;
+}
diff --git a/util/src/entities/Template.ts b/util/src/entities/Template.ts
new file mode 100644
index 00000000..5c9a5120
--- /dev/null
+++ b/util/src/entities/Template.ts
@@ -0,0 +1,33 @@
+import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Guild } from "./Guild";
+import { User } from "./User";
+
+@Entity("templates")
+export class Template extends BaseClass {
+ @Column()
+ code: string;
+
+ @Column()
+ name: string;
+
+ @Column()
+ description?: string;
+
+ @Column()
+ usage_count?: number;
+
+ @JoinColumn({ name: "creator_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ creator: User;
+
+ @Column()
+ created_at: Date;
+
+ @Column()
+ updated_at: Date;
+
+ @JoinColumn({ name: "source_guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ source_guild: Guild;
+}
diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts
new file mode 100644
index 00000000..073f6217
--- /dev/null
+++ b/util/src/entities/User.ts
@@ -0,0 +1,188 @@
+import { Column, Entity, JoinColumn, OneToMany, OneToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { BitField } from "../util/BitField";
+import { Relationship } from "./Relationship";
+import { ConnectedAccount } from "./ConnectedAccount";
+
+export const PublicUserProjection = {
+ username: true,
+ discriminator: true,
+ id: true,
+ public_flags: true,
+ avatar: true,
+ accent_color: true,
+ banner: true,
+ bio: true,
+ bot: true,
+};
+
+@Entity("users")
+export class User extends BaseClass {
+ @Column()
+ username: string; // username max length 32, min 2 (should be configurable)
+
+ @Column()
+ discriminator: string; // #0001 4 digit long string from #0001 - #9999
+
+ @Column()
+ avatar?: string; // hash of the user avatar
+
+ @Column()
+ accent_color?: number; // banner color of user
+
+ @Column()
+ banner?: string; // hash of the user banner
+
+ @Column()
+ phone?: string; // phone number of the user
+
+ @Column()
+ desktop: boolean; // if the user has desktop app installed
+
+ @Column()
+ mobile: boolean; // if the user has mobile app installed
+
+ @Column()
+ premium: boolean; // if user bought nitro
+
+ @Column()
+ premium_type: number; // nitro level
+
+ @Column()
+ bot: boolean; // if user is bot
+
+ @Column()
+ bio: string; // short description of the user (max 190 chars -> should be configurable)
+
+ @Column()
+ system: boolean; // shouldn't be used, the api sents this field type true, if the generated message comes from a system generated author
+
+ @Column()
+ nsfw_allowed: boolean; // if the user is older than 18 (resp. Config)
+
+ @Column()
+ mfa_enabled: boolean; // if multi factor authentication is enabled
+
+ @Column()
+ created_at: Date; // registration date
+
+ @Column()
+ verified: boolean; // if the user is offically verified
+
+ @Column()
+ disabled: boolean; // if the account is disabled
+
+ @Column()
+ deleted: boolean; // if the user was deleted
+
+ @Column()
+ email?: string; // email of the user
+
+ @Column({ type: "bigint" })
+ flags: bigint; // UserFlags
+
+ @Column({ type: "bigint" })
+ public_flags: bigint;
+
+ @Column("simple-array") // string in simple-array must not contain commas
+ guilds: string[]; // array of guild ids the user is part of
+
+ @Column("simple-array") // string in simple-array must not contain commas
+ relationship_ids: string[]; // array of guild ids the user is part of
+
+ @JoinColumn({ name: "relationship_ids" })
+ @OneToMany(() => User, (user: User) => user.id)
+ relationships: Relationship[];
+
+ @Column("simple-array") // string in simple-array must not contain commas
+ connected_account_ids: string[]; // array of guild ids the user is part of
+
+ @JoinColumn({ name: "connected_account_ids" })
+ @OneToMany(() => ConnectedAccount, (account: ConnectedAccount) => account.id)
+ connected_accounts: ConnectedAccount[];
+
+ @Column({ type: "simple-json", select: false })
+ user_data: {
+ valid_tokens_since: Date; // all tokens with a previous issue date are invalid
+ hash: string; // hash of the password, salt is saved in password (bcrypt)
+ fingerprints: string[]; // array of fingerprints -> used to prevent multiple accounts
+ };
+
+ @Column("simple-json")
+ settings: UserSettings;
+}
+
+export interface UserSettings {
+ afk_timeout: number;
+ allow_accessibility_detection: boolean;
+ animate_emoji: boolean;
+ animate_stickers: number;
+ contact_sync_enabled: boolean;
+ convert_emoticons: boolean;
+ custom_status: {
+ emoji_id?: string;
+ emoji_name?: string;
+ expires_at?: number;
+ text?: string;
+ };
+ default_guilds_restricted: boolean;
+ detect_platform_accounts: boolean;
+ developer_mode: boolean;
+ disable_games_tab: boolean;
+ enable_tts_command: boolean;
+ explicit_content_filter: number;
+ friend_source_flags: { all: boolean };
+ gateway_connected: boolean;
+ gif_auto_play: boolean;
+ // every top guild is displayed as a "folder"
+ guild_folders: {
+ color: number;
+ guild_ids: string[];
+ id: number;
+ name: string;
+ }[];
+ guild_positions: string[]; // guild ids ordered by position
+ inline_attachment_media: boolean;
+ inline_embed_media: boolean;
+ locale: string; // en_US
+ message_display_compact: boolean;
+ native_phone_integration_enabled: boolean;
+ render_embeds: boolean;
+ render_reactions: boolean;
+ restricted_guilds: string[];
+ show_current_game: boolean;
+ status: "online" | "offline" | "dnd" | "idle";
+ stream_notifications_enabled: boolean;
+ theme: "dark" | "white"; // dark
+ timezone_offset: number; // e.g -60
+}
+
+// Private user data that should never get sent to the client
+export interface PublicUser {
+ id: string;
+ discriminator: string;
+ username: string;
+ avatar?: string;
+ accent_color?: number;
+ banner?: string;
+ public_flags: bigint;
+ bot: boolean;
+}
+
+export class UserFlags extends BitField {
+ static FLAGS = {
+ DISCORD_EMPLOYEE: BigInt(1) << BigInt(0),
+ PARTNERED_SERVER_OWNER: BigInt(1) << BigInt(1),
+ HYPESQUAD_EVENTS: BigInt(1) << BigInt(2),
+ BUGHUNTER_LEVEL_1: BigInt(1) << BigInt(3),
+ HOUSE_BRAVERY: BigInt(1) << BigInt(6),
+ HOUSE_BRILLIANCE: BigInt(1) << BigInt(7),
+ HOUSE_BALANCE: BigInt(1) << BigInt(8),
+ EARLY_SUPPORTER: BigInt(1) << BigInt(9),
+ TEAM_USER: BigInt(1) << BigInt(10),
+ SYSTEM: BigInt(1) << BigInt(12),
+ BUGHUNTER_LEVEL_2: BigInt(1) << BigInt(14),
+ VERIFIED_BOT: BigInt(1) << BigInt(16),
+ EARLY_VERIFIED_BOT_DEVELOPER: BigInt(1) << BigInt(17),
+ };
+}
diff --git a/util/src/entities/VoiceState.ts b/util/src/entities/VoiceState.ts
new file mode 100644
index 00000000..2416c6c0
--- /dev/null
+++ b/util/src/entities/VoiceState.ts
@@ -0,0 +1,44 @@
+import { Column, Entity, JoinColumn, ManyToOne, OneToOne } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Channel } from "./Channel";
+import { Guild } from "./Guild";
+import { User } from "./User";
+
+@Entity("voice_states")
+export class VoiceState extends BaseClass {
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild, (guild: Guild) => guild.id)
+ guild?: Guild;
+
+ @JoinColumn({ name: "channel_id" })
+ @ManyToOne(() => Channel, (channel: Channel) => channel.id)
+ channel: Channel;
+
+ @JoinColumn({ name: "user_id" })
+ @ManyToOne(() => User, (user: User) => user.id)
+ user: User;
+
+ @Column()
+ session_id: string;
+
+ @Column()
+ deaf: boolean;
+
+ @Column()
+ mute: boolean;
+
+ @Column()
+ self_deaf: boolean;
+
+ @Column()
+ self_mute: boolean;
+
+ @Column()
+ self_stream?: boolean;
+
+ @Column()
+ self_video: boolean;
+
+ @Column()
+ suppress: boolean; // whether this user is muted by the current user
+}
diff --git a/util/src/entities/Webhook.ts b/util/src/entities/Webhook.ts
new file mode 100644
index 00000000..54233638
--- /dev/null
+++ b/util/src/entities/Webhook.ts
@@ -0,0 +1,40 @@
+import { Column, Entity, JoinColumn } from "typeorm";
+import { BaseClass } from "./BaseClass";
+
+export enum WebhookType {
+ Incoming = 1,
+ ChannelFollower = 2,
+}
+
+@Entity("webhooks")
+export class Webhook extends BaseClass {
+ @Column()
+ id: string;
+
+ @Column({ type: "simple-enum", enum: WebhookType })
+ type: WebhookType;
+
+ @Column()
+ name?: string;
+
+ @Column()
+ avatar?: string;
+
+ @Column()
+ token?: string;
+
+ @JoinColumn()
+ guild?: string;
+
+ @JoinColumn()
+ channel: string;
+
+ @JoinColumn()
+ application?: string;
+
+ @JoinColumn()
+ user?: string;
+
+ @JoinColumn()
+ source_guild: string;
+}
diff --git a/util/src/entities/index.ts b/util/src/entities/index.ts
new file mode 100644
index 00000000..9cb10016
--- /dev/null
+++ b/util/src/entities/index.ts
@@ -0,0 +1,21 @@
+export * from "./Application";
+export * from "./AuditLog";
+export * from "./Ban";
+export * from "./BaseClass";
+export * from "./Channel";
+export * from "./ConnectedAccount";
+export * from "./Emoji";
+export * from "./Guild";
+export * from "./Invite";
+export * from "./Member";
+export * from "./Message";
+export * from "./RateLimit";
+export * from "./ReadState";
+export * from "./Relationship";
+export * from "./Role";
+export * from "./Team";
+export * from "./TeamMember";
+export * from "./Template";
+export * from "./User";
+export * from "./VoiceState";
+export * from "./Webhook";
diff --git a/util/src/entities/schema.json b/util/src/entities/schema.json
new file mode 100644
index 00000000..ebf66e88
--- /dev/null
+++ b/util/src/entities/schema.json
@@ -0,0 +1,5725 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "definitions": {
+ "Activity": {
+ "properties": {
+ "application_id": {
+ "type": "string"
+ },
+ "assets": {
+ "properties": {
+ "large_image": {
+ "type": "string"
+ },
+ "large_text": {
+ "type": "string"
+ },
+ "small_image": {
+ "type": "string"
+ },
+ "small_text": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "details": {
+ "type": "string"
+ },
+ "emoji": {
+ "properties": {
+ "amimated": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "flags": {
+ "type": "bigint"
+ },
+ "instance": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "party": {
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "size": {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "secrets": {
+ "properties": {
+ "join": {
+ "type": "string"
+ },
+ "match": {
+ "type": "string"
+ },
+ "spectate": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "state": {
+ "type": "string"
+ },
+ "timestamps": {
+ "items": {
+ "properties": {
+ "end": {
+ "type": "number"
+ },
+ "start": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "type": {
+ "$ref": "#/definitions/ActivityType"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ActivityType": {
+ "enum": [
+ 0,
+ 1,
+ 2,
+ 4,
+ 5
+ ],
+ "type": "number"
+ },
+ "AllowedMentions": {
+ "properties": {
+ "parse": {
+ "items": {
+ "enum": [
+ "everyone",
+ "roles",
+ "users"
+ ],
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "replied_user": {
+ "type": "boolean"
+ },
+ "roles": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "users": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Application": {
+ "properties": {
+ "bot_public": {
+ "type": "boolean"
+ },
+ "bot_require_code_grant": {
+ "type": "boolean"
+ },
+ "construct": {
+ },
+ "cover_image": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "flags": {
+ "type": "number"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "icon": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "name": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "owner_id": {
+ "type": "string"
+ },
+ "primary_sku_id": {
+ "type": "string"
+ },
+ "privacy_policy_url": {
+ "type": "string"
+ },
+ "rpc_origins": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "summary": {
+ "type": "string"
+ },
+ "team": {
+ "$ref": "#/definitions/Team"
+ },
+ "team_id": {
+ "type": "string"
+ },
+ "terms_of_service_url": {
+ "type": "string"
+ },
+ "verify_key": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ApplicationCommand": {
+ "properties": {
+ "application_id": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "options": {
+ "items": {
+ "$ref": "#/definitions/ApplicationCommandOption"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ApplicationCommandCreateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/ApplicationCommand"
+ },
+ {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "APPLICATION_COMMAND_CREATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ApplicationCommandDeleteEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/ApplicationCommand"
+ },
+ {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "APPLICATION_COMMAND_DELETE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ApplicationCommandInteractionData": {
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "options": {
+ "items": {
+ "$ref": "#/definitions/ApplicationCommandInteractionDataOption"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ApplicationCommandInteractionDataOption": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "options": {
+ "items": {
+ "$ref": "#/definitions/ApplicationCommandInteractionDataOption"
+ },
+ "type": "array"
+ },
+ "value": {
+ }
+ },
+ "type": "object"
+ },
+ "ApplicationCommandOption": {
+ "properties": {
+ "choices": {
+ "items": {
+ "$ref": "#/definitions/ApplicationCommandOptionChoice"
+ },
+ "type": "array"
+ },
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "options": {
+ "items": {
+ "$ref": "#/definitions/ApplicationCommandOption"
+ },
+ "type": "array"
+ },
+ "required": {
+ "type": "boolean"
+ },
+ "type": {
+ "$ref": "#/definitions/ApplicationCommandOptionType"
+ }
+ },
+ "type": "object"
+ },
+ "ApplicationCommandOptionChoice": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": [
+ "string",
+ "number"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "ApplicationCommandOptionType": {
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8
+ ],
+ "type": "number"
+ },
+ "ApplicationCommandPayload": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/ApplicationCommand"
+ },
+ {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "ApplicationCommandUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/ApplicationCommand"
+ },
+ {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "APPLICATION_COMMAND_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Attachment": {
+ "properties": {
+ "content_type": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ },
+ "height": {
+ "type": "number"
+ },
+ "id": {
+ "type": "string"
+ },
+ "proxy_url": {
+ "type": "string"
+ },
+ "size": {
+ "type": "number"
+ },
+ "url": {
+ "type": "string"
+ },
+ "width": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "AuditLogChange": {
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "new_value": {
+ "$ref": "#/definitions/AuditLogChangeValue"
+ },
+ "old_value": {
+ "$ref": "#/definitions/AuditLogChangeValue"
+ }
+ },
+ "type": "object"
+ },
+ "AuditLogChangeValue": {
+ "properties": {
+ "$add": {
+ "items": {
+ "properties": {
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "$remove": {
+ "items": {
+ "properties": {
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "afk_channel_id": {
+ "type": "string"
+ },
+ "afk_timeout": {
+ "type": "number"
+ },
+ "allow": {
+ "type": "string"
+ },
+ "application_id": {
+ "type": "string"
+ },
+ "avatar_hash": {
+ "type": "string"
+ },
+ "banner_hash": {
+ "type": "string"
+ },
+ "bitrate": {
+ "type": "number"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "color": {
+ "type": "number"
+ },
+ "deaf": {
+ "type": "boolean"
+ },
+ "default_message_notifications": {
+ "type": "number"
+ },
+ "deny": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "discovery_splash_hash": {
+ "type": "string"
+ },
+ "enable_emoticons": {
+ "type": "boolean"
+ },
+ "expire_behavior": {
+ "type": "number"
+ },
+ "expire_grace_period": {
+ "type": "number"
+ },
+ "explicit_content_filter": {
+ "type": "number"
+ },
+ "hoist": {
+ "type": "boolean"
+ },
+ "icon_hash": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "inviter_id": {
+ "type": "string"
+ },
+ "max_age": {
+ "type": "number"
+ },
+ "max_uses": {
+ "type": "number"
+ },
+ "mentionable": {
+ "type": "boolean"
+ },
+ "mfa_level": {
+ "type": "number"
+ },
+ "mute": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "nick": {
+ "type": "string"
+ },
+ "nsfw": {
+ "type": "boolean"
+ },
+ "owner_id": {
+ "type": "string"
+ },
+ "permission_overwrites": {
+ "items": {
+ "$ref": "#/definitions/ChannelPermissionOverwrite"
+ },
+ "type": "array"
+ },
+ "permissions": {
+ "type": "string"
+ },
+ "position": {
+ "type": "number"
+ },
+ "preferred_locale": {
+ "type": "string"
+ },
+ "prune_delete_days": {
+ "type": "number"
+ },
+ "public_updates_channel_id": {
+ "type": "string"
+ },
+ "rate_limit_per_user": {
+ "type": "number"
+ },
+ "region": {
+ "type": "string"
+ },
+ "rules_channel_id": {
+ "type": "string"
+ },
+ "splash_hash": {
+ "type": "string"
+ },
+ "system_channel_id": {
+ "type": "string"
+ },
+ "temporary": {
+ "type": "boolean"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "type": {
+ "type": "number"
+ },
+ "user_limit": {
+ "type": "number"
+ },
+ "uses": {
+ "type": "number"
+ },
+ "vanity_url_code": {
+ "type": "string"
+ },
+ "verification_level": {
+ "type": "number"
+ },
+ "widget_channel_id": {
+ "type": "string"
+ },
+ "widget_enabled": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "AuditLogEntry": {
+ "properties": {
+ "action_type": {
+ "$ref": "#/definitions/AuditLogEvents"
+ },
+ "changes": {
+ "items": {
+ "$ref": "#/definitions/AuditLogChange"
+ },
+ "type": "array"
+ },
+ "construct": {
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "options": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "count": {
+ "type": "string"
+ },
+ "delete_member_days": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "members_removed": {
+ "type": "string"
+ },
+ "messaged_id": {
+ "type": "string"
+ },
+ "role_name": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "reason": {
+ "type": "string"
+ },
+ "target": {
+ "$ref": "#/definitions/User"
+ },
+ "target_id": {
+ "type": "string"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AuditLogEvents": {
+ "enum": [
+ 1,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26,
+ 27,
+ 28,
+ 30,
+ 31,
+ 32,
+ 40,
+ 41,
+ 42,
+ 50,
+ 51,
+ 52,
+ 60,
+ 61,
+ 62,
+ 72,
+ 73,
+ 74,
+ 75,
+ 80,
+ 81,
+ 82
+ ],
+ "type": "number"
+ },
+ "Ban": {
+ "properties": {
+ "construct": {
+ },
+ "executor": {
+ "$ref": "#/definitions/User"
+ },
+ "executor_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ip": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "reason": {
+ "type": "string"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "BaseClass": {
+ "properties": {
+ "construct": {
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "BigInt": {
+ "properties": {
+ "__@toStringTag": {
+ "enum": [
+ "BigInt"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "BitField": {
+ "description": "Data structure that makes it easy to interact with a bitfield.",
+ "properties": {
+ "bitfield": {
+ "type": "bigint"
+ }
+ },
+ "type": "object"
+ },
+ "BitFieldResolvable": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/BigInt"
+ },
+ {
+ "$ref": "#/definitions/BitField"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/BitFieldResolvable"
+ },
+ "type": "array"
+ },
+ {
+ "type": [
+ "string",
+ "number"
+ ]
+ }
+ ]
+ },
+ "CUSTOMEVENTS": {
+ "enum": [
+ "INVALIDATED"
+ ],
+ "type": "string"
+ },
+ "Channel": {
+ "properties": {
+ "bitrate": {
+ "type": "number"
+ },
+ "construct": {
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "default_auto_archive_duration": {
+ "type": "number"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "last_message": {
+ "$ref": "#/definitions/Message"
+ },
+ "last_message_id": {
+ "type": "string"
+ },
+ "last_pin_timestamp": {
+ "type": "number"
+ },
+ "metadata": {
+ },
+ "name": {
+ "type": "string"
+ },
+ "nsfw": {
+ "type": "boolean"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "owner": {
+ "$ref": "#/definitions/User"
+ },
+ "owner_id": {
+ "type": "string"
+ },
+ "parent": {
+ "$ref": "#/definitions/Channel"
+ },
+ "parent_id": {
+ "type": "string"
+ },
+ "permission_overwrites": {
+ "items": {
+ "$ref": "#/definitions/ChannelPermissionOverwrite"
+ },
+ "type": "array"
+ },
+ "position": {
+ "type": "number"
+ },
+ "rate_limit_per_user": {
+ "type": "number"
+ },
+ "recipient_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "recipients": {
+ "items": {
+ "$ref": "#/definitions/User"
+ },
+ "type": "array"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/ChannelType"
+ },
+ "user_limit": {
+ "type": "number"
+ },
+ "video_quality_mode": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ChannelCreateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/Channel"
+ },
+ "event": {
+ "enum": [
+ "CHANNEL_CREATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ChannelDeleteEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/Channel"
+ },
+ "event": {
+ "enum": [
+ "CHANNEL_DELETE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ChannelPermissionOverwrite": {
+ "properties": {
+ "allow": {
+ "type": "bigint"
+ },
+ "deny": {
+ "type": "bigint"
+ },
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/ChannelPermissionOverwriteType"
+ }
+ },
+ "type": "object"
+ },
+ "ChannelPermissionOverwriteType": {
+ "enum": [
+ 0,
+ 1
+ ],
+ "type": "number"
+ },
+ "ChannelPinsUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "last_pin_timestamp": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "CHANNEL_PINS_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ChannelType": {
+ "enum": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6
+ ],
+ "type": "number"
+ },
+ "ChannelUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/Channel"
+ },
+ "event": {
+ "enum": [
+ "CHANNEL_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Channel_1": {
+ "type": "object"
+ },
+ "ClientStatus": {
+ "properties": {
+ "desktop": {
+ "type": "string"
+ },
+ "mobile": {
+ "type": "string"
+ },
+ "web": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ConnectedAccount": {
+ "properties": {
+ "access_token": {
+ "type": "string"
+ },
+ "construct": {
+ },
+ "friend_sync": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "name": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "revoked": {
+ "type": "boolean"
+ },
+ "show_activity": {
+ "type": "boolean"
+ },
+ "type": {
+ "type": "string"
+ },
+ "verifie": {
+ "type": "boolean"
+ },
+ "visibility": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "EVENT": {
+ "enum": [
+ "APPLICATION_COMMAND_CREATE",
+ "APPLICATION_COMMAND_DELETE",
+ "APPLICATION_COMMAND_UPDATE",
+ "CHANNEL_CREATE",
+ "CHANNEL_DELETE",
+ "CHANNEL_PINS_UPDATE",
+ "CHANNEL_UPDATE",
+ "GUILD_BAN_ADD",
+ "GUILD_BAN_REMOVE",
+ "GUILD_CREATE",
+ "GUILD_DELETE",
+ "GUILD_EMOJI_UPDATE",
+ "GUILD_INTEGRATIONS_UPDATE",
+ "GUILD_MEMBERS_CHUNK",
+ "GUILD_MEMBER_ADD",
+ "GUILD_MEMBER_REMOVE",
+ "GUILD_MEMBER_SPEAKING",
+ "GUILD_MEMBER_UPDATE",
+ "GUILD_ROLE_CREATE",
+ "GUILD_ROLE_DELETE",
+ "GUILD_ROLE_UPDATE",
+ "GUILD_UPDATE",
+ "INTERACTION_CREATE",
+ "INVALIDATED",
+ "INVITE_CREATE",
+ "INVITE_DELETE",
+ "MESSAGE_ACK",
+ "MESSAGE_CREATE",
+ "MESSAGE_DELETE",
+ "MESSAGE_DELETE_BULK",
+ "MESSAGE_REACTION_ADD",
+ "MESSAGE_REACTION_REMOVE",
+ "MESSAGE_REACTION_REMOVE_ALL",
+ "MESSAGE_REACTION_REMOVE_EMOJI",
+ "MESSAGE_UPDATE",
+ "PRESENCE_UPDATE",
+ "READY",
+ "RELATIONSHIP_ADD",
+ "RELATIONSHIP_REMOVE",
+ "TYPING_START",
+ "USER_UPDATE",
+ "VOICE_SERVER_UPDATE",
+ "VOICE_STATE_UPDATE",
+ "WEBHOOKS_UPDATE"
+ ],
+ "type": "string"
+ },
+ "EVENTEnum": {
+ "enum": [
+ "APPLICATION_COMMAND_CREATE",
+ "APPLICATION_COMMAND_DELETE",
+ "APPLICATION_COMMAND_UPDATE",
+ "CHANNEL_CREATE",
+ "CHANNEL_DELETE",
+ "CHANNEL_PINS_UPDATE",
+ "CHANNEL_UPDATE",
+ "GUILD_BAN_ADD",
+ "GUILD_BAN_REMOVE",
+ "GUILD_CREATE",
+ "GUILD_DELETE",
+ "GUILD_EMOJI_UPDATE",
+ "GUILD_INTEGRATIONS_UPDATE",
+ "GUILD_MEMBERS_CHUNK",
+ "GUILD_MEMBER_ADD",
+ "GUILD_MEMBER_REMOVE",
+ "GUILD_MEMBER_SPEAKING",
+ "GUILD_MEMBER_UPDATE",
+ "GUILD_ROLE_CREATE",
+ "GUILD_ROLE_DELETE",
+ "GUILD_ROLE_UPDATE",
+ "GUILD_UPDATE",
+ "INTERACTION_CREATE",
+ "INVITE_CREATE",
+ "INVITE_DELETE",
+ "MESSAGE_CREATE",
+ "MESSAGE_DELETE",
+ "MESSAGE_DELETE_BULK",
+ "MESSAGE_REACTION_ADD",
+ "MESSAGE_REACTION_REMOVE",
+ "MESSAGE_REACTION_REMOVE_ALL",
+ "MESSAGE_REACTION_REMOVE_EMOJI",
+ "MESSAGE_UPDATE",
+ "PRESENCE_UPDATE",
+ "READY",
+ "TYPING_START",
+ "USER_UPDATE",
+ "VOICE_SERVER_UPDATE",
+ "VOICE_STATE_UPDATE",
+ "WEBHOOKS_UPDATE"
+ ],
+ "type": "string"
+ },
+ "Embed": {
+ "properties": {
+ "author": {
+ "properties": {
+ "icon_url": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proxy_icon_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "color": {
+ "type": "number"
+ },
+ "description": {
+ "type": "string"
+ },
+ "fields": {
+ "items": {
+ "properties": {
+ "inline": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "footer": {
+ "properties": {
+ "icon_url": {
+ "type": "string"
+ },
+ "proxy_icon_url": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "image": {
+ "$ref": "#/definitions/EmbedImage"
+ },
+ "provider": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "thumbnail": {
+ "$ref": "#/definitions/EmbedImage"
+ },
+ "timestamp": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "article",
+ "gifv",
+ "image",
+ "link",
+ "rich",
+ "video"
+ ],
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "video": {
+ "$ref": "#/definitions/EmbedImage"
+ }
+ },
+ "type": "object"
+ },
+ "EmbedImage": {
+ "properties": {
+ "height": {
+ "type": "number"
+ },
+ "proxy_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "width": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "EmbedType": {
+ "enum": [
+ "article",
+ "gifv",
+ "image",
+ "link",
+ "rich",
+ "video"
+ ],
+ "type": "string"
+ },
+ "Emoji": {
+ "properties": {
+ "animated": {
+ "type": "boolean"
+ },
+ "available": {
+ "type": "boolean"
+ },
+ "construct": {
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "managed": {
+ "type": "boolean"
+ },
+ "metadata": {
+ },
+ "name": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "require_colons": {
+ "type": "boolean"
+ },
+ "role_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "roles": {
+ "items": {
+ "$ref": "#/definitions/Role"
+ },
+ "type": "array"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Event": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ },
+ "event": {
+ "$ref": "#/definitions/EVENT"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "EventOpts": {
+ "properties": {
+ "acknowledge": {
+ "$ref": "#/definitions/Function"
+ },
+ "cancel": {
+ "$ref": "#/definitions/Function"
+ },
+ "channel": {
+ "$ref": "#/definitions/Channel_1"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ },
+ "event": {
+ "$ref": "#/definitions/EVENT"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Function": {
+ "properties": {
+ "arguments": {
+ },
+ "caller": {
+ "$ref": "#/definitions/Function"
+ },
+ "length": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ },
+ "prototype": {
+ }
+ },
+ "type": "object"
+ },
+ "Guild": {
+ "properties": {
+ "afk_channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "afk_channel_id": {
+ "type": "string"
+ },
+ "afk_timeout": {
+ "type": "number"
+ },
+ "banner": {
+ "type": "string"
+ },
+ "channel_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "channels": {
+ "items": {
+ "$ref": "#/definitions/Channel"
+ },
+ "type": "array"
+ },
+ "construct": {
+ },
+ "default_message_notifications": {
+ "type": "number"
+ },
+ "description": {
+ "type": "string"
+ },
+ "discovery_splash": {
+ "type": "string"
+ },
+ "emoji_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "emojis": {
+ "items": {
+ "$ref": "#/definitions/Emoji"
+ },
+ "type": "array"
+ },
+ "explicit_content_filter": {
+ "type": "number"
+ },
+ "features": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "icon": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "large": {
+ "type": "boolean"
+ },
+ "max_members": {
+ "type": "number"
+ },
+ "max_presences": {
+ "type": "number"
+ },
+ "max_video_channel_users": {
+ "type": "number"
+ },
+ "member_count": {
+ "type": "number"
+ },
+ "member_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "members": {
+ "items": {
+ "$ref": "#/definitions/Member"
+ },
+ "type": "array"
+ },
+ "metadata": {
+ },
+ "mfa_level": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "owner": {
+ "$ref": "#/definitions/User"
+ },
+ "owner_id": {
+ "type": "string"
+ },
+ "preferred_locale": {
+ "type": "string"
+ },
+ "premium_subscription_count": {
+ "type": "number"
+ },
+ "premium_tier": {
+ "type": "number"
+ },
+ "presence_count": {
+ "type": "number"
+ },
+ "public_updates_channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "region": {
+ "type": "string"
+ },
+ "role_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "roles": {
+ "items": {
+ "$ref": "#/definitions/Role"
+ },
+ "type": "array"
+ },
+ "rules_channel": {
+ "type": "string"
+ },
+ "rules_channel_id": {
+ "type": "string"
+ },
+ "splash": {
+ "type": "string"
+ },
+ "system_channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "system_channel_flags": {
+ "type": "number"
+ },
+ "system_channel_id": {
+ "type": "string"
+ },
+ "unavailable": {
+ "type": "boolean"
+ },
+ "vanity_url": {
+ "$ref": "#/definitions/Invite"
+ },
+ "verification_level": {
+ "type": "number"
+ },
+ "voice_state_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "voice_states": {
+ "items": {
+ "$ref": "#/definitions/VoiceState"
+ },
+ "type": "array"
+ },
+ "welcome_screen": {
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "welcome_channels": {
+ "items": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "emoji_id": {
+ "type": "string"
+ },
+ "emoji_name": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "widget_channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "widget_enabled": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "GuildBanAddEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_BAN_ADD"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildBanRemoveEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_BAN_REMOVE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildCreateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/Guild"
+ },
+ "event": {
+ "enum": [
+ "GUILD_CREATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildDeleteEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "unavailable": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_DELETE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildEmojiUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "emojis": {
+ "items": {
+ "$ref": "#/definitions/Emoji"
+ },
+ "type": "array"
+ },
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_EMOJI_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildIntegrationUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_INTEGRATIONS_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildMemberAddEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/PublicMember"
+ },
+ {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "GUILD_MEMBER_ADD"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildMemberRemoveEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_MEMBER_REMOVE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildMemberUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ },
+ "joined_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "nick": {
+ "type": "string"
+ },
+ "pending": {
+ "type": "boolean"
+ },
+ "premium_since": {
+ "type": "number"
+ },
+ "roles": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_MEMBER_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildMembersChunkEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "chunk_count": {
+ "type": "number"
+ },
+ "chunk_index": {
+ "type": "number"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "members": {
+ "items": {
+ "$ref": "#/definitions/PublicMember"
+ },
+ "type": "array"
+ },
+ "nonce": {
+ "type": "string"
+ },
+ "not_found": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "presences": {
+ "items": {
+ "$ref": "#/definitions/Presence"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_MEMBERS_CHUNK"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildRoleCreateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ },
+ "role": {
+ "$ref": "#/definitions/Role"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_ROLE_CREATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildRoleDeleteEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ },
+ "role_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_ROLE_DELETE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildRoleUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "guild_id": {
+ "type": "string"
+ },
+ "role": {
+ "$ref": "#/definitions/Role"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "GUILD_ROLE_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GuildUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/Guild"
+ },
+ "event": {
+ "enum": [
+ "GUILD_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Intents": {
+ "properties": {
+ "bitfield": {
+ "type": "bigint"
+ }
+ },
+ "type": "object"
+ },
+ "Interaction": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ },
+ "type": "object"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "member_id": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/InteractionType"
+ },
+ "version": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "InteractionApplicationCommandCallbackData": {
+ "properties": {
+ "allowed_mentions": {
+ "$ref": "#/definitions/AllowedMentions"
+ },
+ "content": {
+ "type": "string"
+ },
+ "embeds": {
+ "items": {
+ "$ref": "#/definitions/Embed"
+ },
+ "type": "array"
+ },
+ "tts": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "InteractionCreateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/Interaction"
+ },
+ "event": {
+ "enum": [
+ "INTERACTION_CREATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "InteractionResponseType": {
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ "type": "number"
+ },
+ "InteractionType": {
+ "enum": [
+ 1,
+ 2
+ ],
+ "type": "number"
+ },
+ "InvalidatedEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ },
+ "event": {
+ "enum": [
+ "INVALIDATED"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Invite": {
+ "properties": {
+ "channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "construct": {
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "expires_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "inviter": {
+ "$ref": "#/definitions/User"
+ },
+ "inviter_id": {
+ "type": "string"
+ },
+ "max_age": {
+ "type": "number"
+ },
+ "max_uses": {
+ "type": "number"
+ },
+ "metadata": {
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "target_user": {
+ "type": "string"
+ },
+ "target_user_type": {
+ "type": "number"
+ },
+ "target_usser_id": {
+ "type": "string"
+ },
+ "temporary": {
+ "type": "boolean"
+ },
+ "uses": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "InviteCreateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/Omit<Invite,\"guild\"|\"channel\">"
+ },
+ {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "INVITE_CREATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "InviteDeleteEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "INVITE_DELETE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ListenEventOpts": {
+ "properties": {
+ "acknowledge": {
+ "type": "boolean"
+ },
+ "channel": {
+ "$ref": "#/definitions/Channel_1"
+ }
+ },
+ "type": "object"
+ },
+ "Member": {
+ "properties": {
+ "construct": {
+ },
+ "deaf": {
+ "type": "boolean"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "joined_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "mute": {
+ "type": "boolean"
+ },
+ "nick": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "pending": {
+ "type": "boolean"
+ },
+ "premium_since": {
+ "type": "number"
+ },
+ "read_state": {
+ "$ref": "#/definitions/Record<string,string|null>"
+ },
+ "roles": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "settings": {
+ "$ref": "#/definitions/UserGuildSettings"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Message": {
+ "properties": {
+ "activity": {
+ "properties": {
+ "party_id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "application": {
+ "$ref": "#/definitions/Application"
+ },
+ "application_id": {
+ "type": "string"
+ },
+ "attachments": {
+ "items": {
+ "$ref": "#/definitions/Attachment"
+ },
+ "type": "array"
+ },
+ "author": {
+ "$ref": "#/definitions/User"
+ },
+ "author_id": {
+ "type": "string"
+ },
+ "channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "components": {
+ "items": {
+ "$ref": "#/definitions/MessageComponent"
+ },
+ "type": "array"
+ },
+ "construct": {
+ },
+ "content": {
+ "type": "string"
+ },
+ "edited_timestamp": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "embeds": {
+ "items": {
+ "$ref": "#/definitions/Embed"
+ },
+ "type": "array"
+ },
+ "flags": {
+ "type": "bigint"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "interaction": {
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/InteractionType"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "member": {
+ "$ref": "#/definitions/Member"
+ },
+ "member_id": {
+ "type": "string"
+ },
+ "mention_channel_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "mention_channels": {
+ "items": {
+ "$ref": "#/definitions/Channel"
+ },
+ "type": "array"
+ },
+ "mention_everyone": {
+ "type": "boolean"
+ },
+ "mention_role_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "mention_roles": {
+ "items": {
+ "$ref": "#/definitions/Role"
+ },
+ "type": "array"
+ },
+ "mention_user_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "mention_users": {
+ "items": {
+ "$ref": "#/definitions/User"
+ },
+ "type": "array"
+ },
+ "message_reference": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "message_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "metadata": {
+ },
+ "nonce": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "pinned": {
+ "type": "boolean"
+ },
+ "reactions": {
+ "items": {
+ "$ref": "#/definitions/Reaction"
+ },
+ "type": "array"
+ },
+ "stickers": {
+ "items": {
+ },
+ "type": "array"
+ },
+ "timestamp": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "tts": {
+ "type": "boolean"
+ },
+ "type": {
+ "$ref": "#/definitions/MessageType"
+ },
+ "webhook": {
+ "$ref": "#/definitions/Webhook"
+ },
+ "webhook_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageAckEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "manual": {
+ "type": "boolean"
+ },
+ "mention_count": {
+ "type": "number"
+ },
+ "message_id": {
+ "type": "string"
+ },
+ "version": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_ACK"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageComponent": {
+ "properties": {
+ "components": {
+ "items": {
+ "$ref": "#/definitions/MessageComponent"
+ },
+ "type": "array"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "disabled": {
+ "type": "boolean"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "label": {
+ "type": "string"
+ },
+ "style": {
+ "type": "number"
+ },
+ "type": {
+ "type": "number"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageComponentType": {
+ "enum": [
+ 1,
+ 2
+ ],
+ "type": "number"
+ },
+ "MessageCreateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/Omit<Message,\"author_id\">"
+ },
+ {
+ "properties": {
+ "author": {
+ "$ref": "#/definitions/PublicUser"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ },
+ "mentions": {
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/PublicUser"
+ },
+ {
+ "properties": {
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_CREATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageDeleteBulkEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_DELETE_BULK"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageDeleteEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_DELETE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageFlags": {
+ "properties": {
+ "bitfield": {
+ "type": "bigint"
+ }
+ },
+ "type": "object"
+ },
+ "MessagePayload": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/Omit<Message,\"author_id\">"
+ },
+ {
+ "properties": {
+ "author": {
+ "$ref": "#/definitions/PublicUser"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ },
+ "mentions": {
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/PublicUser"
+ },
+ {
+ "properties": {
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "MessageReactionAddEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ },
+ "message_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_REACTION_ADD"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageReactionRemoveAllEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "message_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_REACTION_REMOVE_ALL"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageReactionRemoveEmojiEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "message_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_REACTION_REMOVE_EMOJI"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageReactionRemoveEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "message_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_REACTION_REMOVE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MessageType": {
+ "enum": [
+ 0,
+ 1,
+ 10,
+ 11,
+ 12,
+ 14,
+ 15,
+ 19,
+ 2,
+ 20,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9
+ ],
+ "type": "number"
+ },
+ "MessageUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/Omit<Message,\"author_id\">"
+ },
+ {
+ "properties": {
+ "author": {
+ "$ref": "#/definitions/PublicUser"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ },
+ "mentions": {
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/PublicUser"
+ },
+ {
+ "properties": {
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "MESSAGE_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "MuteConfig": {
+ "properties": {
+ "end_time": {
+ "type": "number"
+ },
+ "selected_time_window": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "Omit<Invite,\"guild\"|\"channel\">": {
+ "properties": {
+ "assign": {
+ "type": "object"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "construct": {
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "expires_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "hasId": {
+ "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.",
+ "type": "object"
+ },
+ "id": {
+ "type": "string"
+ },
+ "inviter": {
+ "$ref": "#/definitions/User"
+ },
+ "inviter_id": {
+ "type": "string"
+ },
+ "max_age": {
+ "type": "number"
+ },
+ "max_uses": {
+ "type": "number"
+ },
+ "metadata": {
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "recover": {
+ "description": "Recovers a given entity in the database.",
+ "type": "object"
+ },
+ "reload": {
+ "description": "Reloads entity data from the database.",
+ "type": "object"
+ },
+ "remove": {
+ "description": "Removes current entity from the database.",
+ "type": "object"
+ },
+ "save": {
+ "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.",
+ "type": "object"
+ },
+ "softRemove": {
+ "description": "Records the delete date of current entity.",
+ "type": "object"
+ },
+ "target_user": {
+ "type": "string"
+ },
+ "target_user_type": {
+ "type": "number"
+ },
+ "target_usser_id": {
+ "type": "string"
+ },
+ "temporary": {
+ "type": "boolean"
+ },
+ "toJSON": {
+ "type": "object"
+ },
+ "uses": {
+ "type": "number"
+ },
+ "validate": {
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "Omit<Member,\"settings\"|\"user\">": {
+ "properties": {
+ "assign": {
+ "type": "object"
+ },
+ "construct": {
+ },
+ "deaf": {
+ "type": "boolean"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "hasId": {
+ "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.",
+ "type": "object"
+ },
+ "id": {
+ "type": "string"
+ },
+ "joined_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "mute": {
+ "type": "boolean"
+ },
+ "nick": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "pending": {
+ "type": "boolean"
+ },
+ "premium_since": {
+ "type": "number"
+ },
+ "read_state": {
+ "$ref": "#/definitions/Record<string,string|null>"
+ },
+ "recover": {
+ "description": "Recovers a given entity in the database.",
+ "type": "object"
+ },
+ "reload": {
+ "description": "Reloads entity data from the database.",
+ "type": "object"
+ },
+ "remove": {
+ "description": "Removes current entity from the database.",
+ "type": "object"
+ },
+ "roles": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "save": {
+ "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.",
+ "type": "object"
+ },
+ "softRemove": {
+ "description": "Records the delete date of current entity.",
+ "type": "object"
+ },
+ "toJSON": {
+ "type": "object"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "validate": {
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "Omit<Message,\"author_id\">": {
+ "properties": {
+ "activity": {
+ "properties": {
+ "party_id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "application": {
+ "$ref": "#/definitions/Application"
+ },
+ "application_id": {
+ "type": "string"
+ },
+ "assign": {
+ "type": "object"
+ },
+ "attachments": {
+ "items": {
+ "$ref": "#/definitions/Attachment"
+ },
+ "type": "array"
+ },
+ "author": {
+ "$ref": "#/definitions/User"
+ },
+ "channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "components": {
+ "items": {
+ "$ref": "#/definitions/MessageComponent"
+ },
+ "type": "array"
+ },
+ "construct": {
+ },
+ "content": {
+ "type": "string"
+ },
+ "edited_timestamp": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "embeds": {
+ "items": {
+ "$ref": "#/definitions/Embed"
+ },
+ "type": "array"
+ },
+ "flags": {
+ "type": "bigint"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "hasId": {
+ "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.",
+ "type": "object"
+ },
+ "id": {
+ "type": "string"
+ },
+ "interaction": {
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/InteractionType"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "member": {
+ "$ref": "#/definitions/Member"
+ },
+ "member_id": {
+ "type": "string"
+ },
+ "mention_channel_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "mention_channels": {
+ "items": {
+ "$ref": "#/definitions/Channel"
+ },
+ "type": "array"
+ },
+ "mention_everyone": {
+ "type": "boolean"
+ },
+ "mention_role_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "mention_roles": {
+ "items": {
+ "$ref": "#/definitions/Role"
+ },
+ "type": "array"
+ },
+ "mention_user_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "mention_users": {
+ "items": {
+ "$ref": "#/definitions/User"
+ },
+ "type": "array"
+ },
+ "message_reference": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "message_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "metadata": {
+ },
+ "nonce": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "pinned": {
+ "type": "boolean"
+ },
+ "reactions": {
+ "items": {
+ "$ref": "#/definitions/Reaction"
+ },
+ "type": "array"
+ },
+ "recover": {
+ "description": "Recovers a given entity in the database.",
+ "type": "object"
+ },
+ "reload": {
+ "description": "Reloads entity data from the database.",
+ "type": "object"
+ },
+ "remove": {
+ "description": "Removes current entity from the database.",
+ "type": "object"
+ },
+ "save": {
+ "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.",
+ "type": "object"
+ },
+ "softRemove": {
+ "description": "Records the delete date of current entity.",
+ "type": "object"
+ },
+ "stickers": {
+ "items": {
+ },
+ "type": "array"
+ },
+ "timestamp": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "toJSON": {
+ "type": "object"
+ },
+ "tts": {
+ "type": "boolean"
+ },
+ "type": {
+ "$ref": "#/definitions/MessageType"
+ },
+ "validate": {
+ "type": "object"
+ },
+ "webhook": {
+ "$ref": "#/definitions/Webhook"
+ },
+ "webhook_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Omit<Relationship,\"nickname\">": {
+ "properties": {
+ "assign": {
+ "type": "object"
+ },
+ "construct": {
+ },
+ "hasId": {
+ "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.",
+ "type": "object"
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "recover": {
+ "description": "Recovers a given entity in the database.",
+ "type": "object"
+ },
+ "reload": {
+ "description": "Reloads entity data from the database.",
+ "type": "object"
+ },
+ "remove": {
+ "description": "Removes current entity from the database.",
+ "type": "object"
+ },
+ "save": {
+ "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.",
+ "type": "object"
+ },
+ "softRemove": {
+ "description": "Records the delete date of current entity.",
+ "type": "object"
+ },
+ "toJSON": {
+ "type": "object"
+ },
+ "type": {
+ "$ref": "#/definitions/RelationshipType"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "validate": {
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "PartialEmoji": {
+ "properties": {
+ "animated": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PermissionCache": {
+ "properties": {
+ "channel": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Channel"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "guild": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Guild"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "member": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Member"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "roles": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/definitions/Role"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PermissionResolvable": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Permissions"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/PermissionResolvable"
+ },
+ "type": "array"
+ },
+ {
+ "enum": [
+ "ADD_REACTIONS",
+ "ADMINISTRATOR",
+ "ATTACH_FILES",
+ "BAN_MEMBERS",
+ "CHANGE_NICKNAME",
+ "CONNECT",
+ "CREATE_INSTANT_INVITE",
+ "DEAFEN_MEMBERS",
+ "EMBED_LINKS",
+ "KICK_MEMBERS",
+ "MANAGE_CHANNELS",
+ "MANAGE_EMOJIS_AND_STICKERS",
+ "MANAGE_GUILD",
+ "MANAGE_MESSAGES",
+ "MANAGE_NICKNAMES",
+ "MANAGE_ROLES",
+ "MANAGE_WEBHOOKS",
+ "MENTION_EVERYONE",
+ "MOVE_MEMBERS",
+ "MUTE_MEMBERS",
+ "PRIORITY_SPEAKER",
+ "READ_MESSAGE_HISTORY",
+ "SEND_MESSAGES",
+ "SEND_TTS_MESSAGES",
+ "SPEAK",
+ "STREAM",
+ "USE_EXTERNAL_EMOJIS",
+ "USE_VAD",
+ "VIEW_AUDIT_LOG",
+ "VIEW_CHANNEL",
+ "VIEW_GUILD_INSIGHTS"
+ ],
+ "type": "string"
+ },
+ {
+ "type": [
+ "number",
+ "bigint"
+ ]
+ }
+ ]
+ },
+ "PermissionString": {
+ "enum": [
+ "ADD_REACTIONS",
+ "ADMINISTRATOR",
+ "ATTACH_FILES",
+ "BAN_MEMBERS",
+ "CHANGE_NICKNAME",
+ "CONNECT",
+ "CREATE_INSTANT_INVITE",
+ "DEAFEN_MEMBERS",
+ "EMBED_LINKS",
+ "KICK_MEMBERS",
+ "MANAGE_CHANNELS",
+ "MANAGE_EMOJIS_AND_STICKERS",
+ "MANAGE_GUILD",
+ "MANAGE_MESSAGES",
+ "MANAGE_NICKNAMES",
+ "MANAGE_ROLES",
+ "MANAGE_WEBHOOKS",
+ "MENTION_EVERYONE",
+ "MOVE_MEMBERS",
+ "MUTE_MEMBERS",
+ "PRIORITY_SPEAKER",
+ "READ_MESSAGE_HISTORY",
+ "SEND_MESSAGES",
+ "SEND_TTS_MESSAGES",
+ "SPEAK",
+ "STREAM",
+ "USE_EXTERNAL_EMOJIS",
+ "USE_VAD",
+ "VIEW_AUDIT_LOG",
+ "VIEW_CHANNEL",
+ "VIEW_GUILD_INSIGHTS"
+ ],
+ "type": "string"
+ },
+ "Permissions": {
+ "properties": {
+ "bitfield": {
+ "type": "bigint"
+ },
+ "cache": {
+ "properties": {
+ "channel": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Channel"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "guild": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Guild"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "member": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Member"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "roles": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/definitions/Role"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "Presence": {
+ "properties": {
+ "activities": {
+ "items": {
+ "$ref": "#/definitions/Activity"
+ },
+ "type": "array"
+ },
+ "client_status": {
+ "$ref": "#/definitions/ClientStatus"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/definitions/Status"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PresenceUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/Presence"
+ },
+ "event": {
+ "enum": [
+ "PRESENCE_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PublicMember": {
+ "properties": {
+ "assign": {
+ "type": "object"
+ },
+ "construct": {
+ },
+ "deaf": {
+ "type": "boolean"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "hasId": {
+ "description": "Checks if entity has an id.\nIf entity composite compose ids, it will check them all.",
+ "type": "object"
+ },
+ "joined_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "mute": {
+ "type": "boolean"
+ },
+ "nick": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "pending": {
+ "type": "boolean"
+ },
+ "premium_since": {
+ "type": "number"
+ },
+ "recover": {
+ "description": "Recovers a given entity in the database.",
+ "type": "object"
+ },
+ "reload": {
+ "description": "Reloads entity data from the database.",
+ "type": "object"
+ },
+ "remove": {
+ "description": "Removes current entity from the database.",
+ "type": "object"
+ },
+ "roles": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "save": {
+ "description": "Saves current entity in the database.\nIf entity does not exist in the database then inserts, otherwise updates.",
+ "type": "object"
+ },
+ "softRemove": {
+ "description": "Records the delete date of current entity.",
+ "type": "object"
+ },
+ "toJSON": {
+ "type": "object"
+ },
+ "user": {
+ "$ref": "#/definitions/PublicUser"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "validate": {
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "PublicUser": {
+ "properties": {
+ "accent_color": {
+ "type": "number"
+ },
+ "avatar": {
+ "type": "string"
+ },
+ "banner": {
+ "type": "string"
+ },
+ "bot": {
+ "type": "boolean"
+ },
+ "discriminator": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "public_flags": {
+ "type": "bigint"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RateLimit": {
+ "properties": {
+ "blocked": {
+ "type": "boolean"
+ },
+ "construct": {
+ },
+ "expires_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "hits": {
+ "type": "number"
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Reaction": {
+ "properties": {
+ "count": {
+ "type": "number"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "user_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ReadState": {
+ "properties": {
+ "channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "construct": {
+ },
+ "id": {
+ "type": "string"
+ },
+ "last_message": {
+ "$ref": "#/definitions/Message"
+ },
+ "last_pin_timestamp": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "manual": {
+ "type": "boolean"
+ },
+ "mention_count": {
+ "type": "number"
+ },
+ "metadata": {
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ReadyEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/ReadyEventData"
+ },
+ "event": {
+ "enum": [
+ "READY"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ReadyEventData": {
+ "properties": {
+ "analytics_token": {
+ "type": "string"
+ },
+ "application": {
+ "properties": {
+ "flags": {
+ "type": "bigint"
+ },
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "connected_accounts": {
+ "items": {
+ "$ref": "#/definitions/ConnectedAccount"
+ },
+ "type": "array"
+ },
+ "consents": {
+ "properties": {
+ "personalization": {
+ "properties": {
+ "consented": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "country_code": {
+ "type": "string"
+ },
+ "experiments": {
+ "items": {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 5,
+ "minItems": 5,
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "friend_suggestion_count": {
+ "type": "number"
+ },
+ "geo_ordered_rtc_regions": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "guild_experiments": {
+ "items": {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "items": [
+ {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "items": {
+ "properties": {
+ "e": {
+ "type": "number"
+ },
+ "s": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ }
+ ],
+ "maxItems": 1,
+ "minItems": 1,
+ "type": "array"
+ },
+ {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "items": [
+ {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ }
+ ],
+ "maxItems": 1,
+ "minItems": 1,
+ "type": "array"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ {
+ "items": {
+ "properties": {
+ "b": {
+ "type": "number"
+ },
+ "k": {
+ "items": {
+ "type": "bigint"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ ],
+ "maxItems": 6,
+ "minItems": 6,
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "guild_join_requests": {
+ "items": {
+ },
+ "type": "array"
+ },
+ "guilds": {
+ "items": {
+ "$ref": "#/definitions/Guild"
+ },
+ "type": "array"
+ },
+ "merged_members": {
+ "items": {
+ "items": {
+ "$ref": "#/definitions/Omit<Member,\"settings\"|\"user\">"
+ },
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "private_channels": {
+ "items": {
+ "$ref": "#/definitions/Channel"
+ },
+ "type": "array"
+ },
+ "read_state": {
+ "properties": {
+ "entries": {
+ "items": {
+ },
+ "type": "array"
+ },
+ "partial": {
+ "type": "boolean"
+ },
+ "version": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "relationships": {
+ "items": {
+ "$ref": "#/definitions/Relationship"
+ },
+ "type": "array"
+ },
+ "session_id": {
+ "type": "string"
+ },
+ "shard": {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "user": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/PublicUser"
+ },
+ {
+ "properties": {
+ "bot": {
+ "type": "boolean"
+ },
+ "desktop": {
+ "type": "boolean"
+ },
+ "email": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "flags": {
+ "type": "bigint"
+ },
+ "mfa_enabled": {
+ "type": "boolean"
+ },
+ "mobile": {
+ "type": "boolean"
+ },
+ "nsfw_allowed": {
+ "type": "boolean"
+ },
+ "phone": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "premium": {
+ "type": "boolean"
+ },
+ "premium_type": {
+ "type": "number"
+ },
+ "verified": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "user_guild_settings": {
+ "properties": {
+ "entries": {
+ "items": {
+ "$ref": "#/definitions/UserGuildSettings"
+ },
+ "type": "array"
+ },
+ "partial": {
+ "type": "boolean"
+ },
+ "version": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "user_settings": {
+ "$ref": "#/definitions/UserSettings"
+ },
+ "users": {
+ "items": {
+ "properties": {
+ "avatar": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "bot": {
+ "type": "boolean"
+ },
+ "discriminator": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "public_flags": {
+ "type": "bigint"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "v": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "Record<string,string|null>": {
+ "type": "object"
+ },
+ "Relationship": {
+ "properties": {
+ "construct": {
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": {
+ "$ref": "#/definitions/RelationshipType"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RelationshipAddEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/Relationship"
+ },
+ {
+ "properties": {
+ "should_notify": {
+ "type": "boolean"
+ },
+ "user": {
+ "$ref": "#/definitions/PublicUser"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "RELATIONSHIP_ADD"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RelationshipRemoveEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/Omit<Relationship,\"nickname\">"
+ },
+ "event": {
+ "enum": [
+ "RELATIONSHIP_REMOVE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RelationshipType": {
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "type": "number"
+ },
+ "Role": {
+ "properties": {
+ "color": {
+ "type": "number"
+ },
+ "construct": {
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "hoist": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "managed": {
+ "type": "boolean"
+ },
+ "mentionable": {
+ "type": "boolean"
+ },
+ "metadata": {
+ },
+ "name": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "permissions": {
+ "type": "bigint"
+ },
+ "position": {
+ "type": "number"
+ },
+ "tags": {
+ "properties": {
+ "bot_id": {
+ "type": "string"
+ },
+ "integration_id": {
+ "type": "string"
+ },
+ "premium_subscriber": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "Snowflake": {
+ "description": "A container for useful snowflake-related methods.",
+ "type": "object"
+ },
+ "Status": {
+ "enum": [
+ "dnd",
+ "idle",
+ "offline",
+ "online"
+ ],
+ "type": "string"
+ },
+ "Team": {
+ "properties": {
+ "construct": {
+ },
+ "icon": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "member_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "members": {
+ "items": {
+ "$ref": "#/definitions/TeamMember"
+ },
+ "type": "array"
+ },
+ "metadata": {
+ },
+ "name": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "owner_user": {
+ "$ref": "#/definitions/User"
+ },
+ "owner_user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TeamMember": {
+ "properties": {
+ "construct": {
+ },
+ "id": {
+ "type": "string"
+ },
+ "membership_state": {
+ "$ref": "#/definitions/TeamMemberState"
+ },
+ "metadata": {
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "permissions": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team": {
+ "$ref": "#/definitions/Team"
+ },
+ "team_id": {
+ "type": "string"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TeamMemberState": {
+ "enum": [
+ 1,
+ 2
+ ],
+ "type": "number"
+ },
+ "Template": {
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "construct": {
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "creator": {
+ "$ref": "#/definitions/User"
+ },
+ "description": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "name": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "source_guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "usage_count": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "TypingStartEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ },
+ "timestamp": {
+ "type": "number"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "TYPING_START"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "User": {
+ "properties": {
+ "accent_color": {
+ "type": "number"
+ },
+ "avatar": {
+ "type": "string"
+ },
+ "banner": {
+ "type": "string"
+ },
+ "bio": {
+ "type": "string"
+ },
+ "bot": {
+ "type": "boolean"
+ },
+ "connected_account_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "connected_accounts": {
+ "items": {
+ "$ref": "#/definitions/ConnectedAccount"
+ },
+ "type": "array"
+ },
+ "construct": {
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "deleted": {
+ "type": "boolean"
+ },
+ "desktop": {
+ "type": "boolean"
+ },
+ "disabled": {
+ "type": "boolean"
+ },
+ "discriminator": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "flags": {
+ "type": "bigint"
+ },
+ "guilds": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "mfa_enabled": {
+ "type": "boolean"
+ },
+ "mobile": {
+ "type": "boolean"
+ },
+ "nsfw_allowed": {
+ "type": "boolean"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "premium": {
+ "type": "boolean"
+ },
+ "premium_type": {
+ "type": "number"
+ },
+ "public_flags": {
+ "type": "bigint"
+ },
+ "relationship_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "relationships": {
+ "items": {
+ "$ref": "#/definitions/Relationship"
+ },
+ "type": "array"
+ },
+ "settings": {
+ "$ref": "#/definitions/UserSettings"
+ },
+ "system": {
+ "type": "boolean"
+ },
+ "user_data": {
+ "properties": {
+ "fingerprints": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "hash": {
+ "type": "string"
+ },
+ "valid_tokens_since": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "username": {
+ "type": "string"
+ },
+ "verified": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "UserFlags": {
+ "properties": {
+ "bitfield": {
+ "type": "bigint"
+ }
+ },
+ "type": "object"
+ },
+ "UserGuildSettings": {
+ "properties": {
+ "channel_overrides": {
+ "items": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "message_notifications": {
+ "type": "number"
+ },
+ "mute_config": {
+ "$ref": "#/definitions/MuteConfig"
+ },
+ "muted": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message_notifications": {
+ "type": "number"
+ },
+ "mobile_push": {
+ "type": "boolean"
+ },
+ "mute_config": {
+ "$ref": "#/definitions/MuteConfig"
+ },
+ "muted": {
+ "type": "boolean"
+ },
+ "suppress_everyone": {
+ "type": "boolean"
+ },
+ "suppress_roles": {
+ "type": "boolean"
+ },
+ "version": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "UserSettings": {
+ "properties": {
+ "afk_timeout": {
+ "type": "number"
+ },
+ "allow_accessibility_detection": {
+ "type": "boolean"
+ },
+ "animate_emoji": {
+ "type": "boolean"
+ },
+ "animate_stickers": {
+ "type": "number"
+ },
+ "contact_sync_enabled": {
+ "type": "boolean"
+ },
+ "convert_emoticons": {
+ "type": "boolean"
+ },
+ "custom_status": {
+ "properties": {
+ "emoji_id": {
+ "type": "string"
+ },
+ "emoji_name": {
+ "type": "string"
+ },
+ "expires_at": {
+ "type": "number"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "default_guilds_restricted": {
+ "type": "boolean"
+ },
+ "detect_platform_accounts": {
+ "type": "boolean"
+ },
+ "developer_mode": {
+ "type": "boolean"
+ },
+ "disable_games_tab": {
+ "type": "boolean"
+ },
+ "enable_tts_command": {
+ "type": "boolean"
+ },
+ "explicit_content_filter": {
+ "type": "number"
+ },
+ "friend_source_flags": {
+ "properties": {
+ "all": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "gateway_connected": {
+ "type": "boolean"
+ },
+ "gif_auto_play": {
+ "type": "boolean"
+ },
+ "guild_folders": {
+ "items": {
+ "properties": {
+ "color": {
+ "type": "number"
+ },
+ "guild_ids": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "id": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "guild_positions": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "inline_attachment_media": {
+ "type": "boolean"
+ },
+ "inline_embed_media": {
+ "type": "boolean"
+ },
+ "locale": {
+ "type": "string"
+ },
+ "message_display_compact": {
+ "type": "boolean"
+ },
+ "native_phone_integration_enabled": {
+ "type": "boolean"
+ },
+ "render_embeds": {
+ "type": "boolean"
+ },
+ "render_reactions": {
+ "type": "boolean"
+ },
+ "restricted_guilds": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "show_current_game": {
+ "type": "boolean"
+ },
+ "status": {
+ "enum": [
+ "dnd",
+ "idle",
+ "offline",
+ "online"
+ ],
+ "type": "string"
+ },
+ "stream_notifications_enabled": {
+ "type": "boolean"
+ },
+ "theme": {
+ "enum": [
+ "dark",
+ "white"
+ ],
+ "type": "string"
+ },
+ "timezone_offset": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "UserUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "$ref": "#/definitions/User"
+ },
+ "event": {
+ "enum": [
+ "USER_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "VoiceServerUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "endpoint": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "VOICE_SERVER_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "VoiceState": {
+ "properties": {
+ "channel": {
+ "$ref": "#/definitions/Channel"
+ },
+ "construct": {
+ },
+ "deaf": {
+ "type": "boolean"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "mute": {
+ "type": "boolean"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "self_deaf": {
+ "type": "boolean"
+ },
+ "self_mute": {
+ "type": "boolean"
+ },
+ "self_stream": {
+ "type": "boolean"
+ },
+ "self_video": {
+ "type": "boolean"
+ },
+ "session_id": {
+ "type": "string"
+ },
+ "suppress": {
+ "type": "boolean"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ }
+ },
+ "type": "object"
+ },
+ "VoiceStateUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/VoiceState"
+ },
+ {
+ "properties": {
+ "member": {
+ "$ref": "#/definitions/PublicMember"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "event": {
+ "enum": [
+ "VOICE_STATE_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Webhook": {
+ "properties": {
+ "application": {
+ "type": "string"
+ },
+ "avatar": {
+ "type": "string"
+ },
+ "channel": {
+ "type": "string"
+ },
+ "construct": {
+ },
+ "guild": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "metadata": {
+ },
+ "name": {
+ "type": "string"
+ },
+ "opts": {
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "source_guild": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/WebhookType"
+ },
+ "user": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "WebhookType": {
+ "enum": [
+ 1,
+ 2
+ ],
+ "type": "number"
+ },
+ "WebhooksUpdateEvent": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "data": {
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "event": {
+ "enum": [
+ "WEBHOOKS_UPDATE"
+ ],
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+}
+
|