From ef99c886b78447342fb8fda6028f396668881bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Wed, 27 Jan 2021 16:46:20 +0900 Subject: [PATCH] types: added some types --- types/index.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/types/index.ts b/types/index.ts index 6ba524d..e6c2798 100644 --- a/types/index.ts +++ b/types/index.ts @@ -44,6 +44,39 @@ export interface BotList { totalPage: number } +export interface DiscordTokenInfo { + access_token?: string + expires_in?: number + refresh_token?: string + scope?: string + token_type?: string + error?: string +} + +export interface TokenRegister { + id: string + access_token: string + expires_in: number + refresh_token: string + email: string + username: string + discriminator: string +} + +export interface DiscordUserInfo { + id: string + username: string + avatar: string + discriminator: string + public_flags: number + flags: number + email: string + verified: boolean + locale: string + mfa_enabled: boolean + premium_type: 0 | 1 | 2 +} + export type Status = 'online' | 'offline' | 'dnd' | 'idle' | 'streaming' | null export type BotState = 'ok' | 'reported' | 'archived' | 'private'