diff --git a/types/index.ts b/types/index.ts index fc6171b..f7373ba 100644 --- a/types/index.ts +++ b/types/index.ts @@ -5,6 +5,8 @@ import type { NextPageContext } from 'next' export type Nullable = T | null +export type ValueOf = T[keyof T] + export interface Bot { id: string name: string @@ -32,7 +34,7 @@ export interface Bot { owners: User[] | string[] } -export type BotEnforcementKeys = 'JOIN_ENFORCED' | 'JOIN_PARTIALLY_ENFORCED' +export type BotEnforcementKeys = ValueOf export interface RawGuild { id: string diff --git a/utils/Constants.ts b/utils/Constants.ts index b8e62c5..e66c0ff 100644 --- a/utils/Constants.ts +++ b/utils/Constants.ts @@ -121,9 +121,11 @@ export const botCategoryDescription = { } export const botEnforcements = { - '서버 참여가 강제되는 명령어가 있습니다': 'JOIN_PARTIALLY_ENFORCED', + '서버 참여가 강제되는 기능이 있습니다': 'JOIN_PARTIALLY_ENFORCED', '서버 참여 없이는 봇의 핵심 기능을 사용할 수 없습니다': 'JOIN_ENFORCED', -} + '라이선스 구매가 필요한 기능이 있습니다': 'LICENSE_PARTIALLY_ENFORCED', + '라이선스 구매 없이는 봇의 핵심 기능을 사용할 수 없습니다': 'LICENSE_ENFORCED', +} as const export const botCategoryIcon = { 관리: 'fas fa-cogs',