From 220ea9ebb826a3b5da3c2fcbb43aff5a88e54469 Mon Sep 17 00:00:00 2001 From: ITOH Date: Mon, 31 May 2021 19:46:57 +0200 Subject: [PATCH] change: use bigint for better ux --- src/types/emojis/create_guild_emoji.ts | 2 +- src/types/emojis/modify_guild_emoji.ts | 2 +- src/types/guilds/modify_guild.ts | 10 +++++----- src/types/guilds/welcome_screen_channel.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/types/emojis/create_guild_emoji.ts b/src/types/emojis/create_guild_emoji.ts index 98959d4c8..75deb40da 100644 --- a/src/types/emojis/create_guild_emoji.ts +++ b/src/types/emojis/create_guild_emoji.ts @@ -5,5 +5,5 @@ export interface CreateGuildEmoji { /** The 128x128 emoji image */ image: string; /** Roles allowed to use this emoji */ - roles: string[]; + roles: bigint[]; } diff --git a/src/types/emojis/modify_guild_emoji.ts b/src/types/emojis/modify_guild_emoji.ts index 5da4bc0da..0ac443d77 100644 --- a/src/types/emojis/modify_guild_emoji.ts +++ b/src/types/emojis/modify_guild_emoji.ts @@ -3,5 +3,5 @@ export interface ModifyGuildEmoji { /** Name of the emoji */ name?: string; /** Roles allowed to use this emoji */ - roles?: string[] | null; + roles?: bigint[] | null; } diff --git a/src/types/guilds/modify_guild.ts b/src/types/guilds/modify_guild.ts index 3f3b95b63..f5f216677 100644 --- a/src/types/guilds/modify_guild.ts +++ b/src/types/guilds/modify_guild.ts @@ -17,13 +17,13 @@ export interface ModifyGuild { /** Explicit content filter level */ explicitContentFilter?: DiscordExplicitContentFilterLevels | null; /** Id for afk channel */ - afkChannelId?: string | null; + afkChannelId?: bigint | null; /** Afk timeout in seconds */ afkTimeout?: number; /** Base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the `ANIMATED_ICON` feature) */ icon?: string | null; /** User id to transfer guild ownership to (must be owner) */ - ownerId?: string; + ownerId?: bigint; /** Base64 16:9 png/jpeg image for the guild splash (when the server has `INVITE_SPLASH` feature) */ splash?: string | null; /** Base64 16:9 png/jpeg image for the guild discovery spash (when the server has the `DISCOVERABLE` feature) */ @@ -31,13 +31,13 @@ export interface ModifyGuild { /** Base64 16:9 png/jpeg image for the guild banner (when the server has BANNER feature) */ banner?: string | null; /** The id of the channel where guild notices such as welcome messages and boost events are posted */ - systemChannelId?: string | null; + systemChannelId?: bigint | null; /** System channel flags */ systemChannelFlags?: DiscordSystemChannelFlags; /** The id of the channel where Community guilds display rules and/or guidelines */ - rulesChannelId?: string | null; + rulesChannelId?: bigint | null; /** The id of the channel where admins and moderators of Community guilds receive notices from Discord */ - publicUpdatesChannelId?: string | null; + publicUpdatesChannelId?: bigint | null; /** The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US" */ preferredLocale?: string | null; /** Enabled guild features */ diff --git a/src/types/guilds/welcome_screen_channel.ts b/src/types/guilds/welcome_screen_channel.ts index 3abfd3802..c3b9b06c2 100644 --- a/src/types/guilds/welcome_screen_channel.ts +++ b/src/types/guilds/welcome_screen_channel.ts @@ -1,11 +1,11 @@ /** https://discord.com/developers/docs/resources/guild#welcome-screen-object-welcome-screen-channel-structure */ export interface WelcomeScreenChannel { /** The channel's id */ - channelId: string; + channelId: bigint; /** The descriptino schown for the channel */ description: string; /** The emoji id, if the emoji is custom */ - emojiId: string | null; + emojiId: bigint | null; /** The emoji name if custom, the unicode character if standard, or `null` if no emoji is set */ emojiName: string | null; }