Skip to content

Commit fd5f3c5

Browse files
committed
chore: add license related enforcements
1 parent f4d388c commit fd5f3c5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

types/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import type { NextPageContext } from 'next'
55

66
export type Nullable<T> = T | null
77

8+
export type ValueOf<T> = T[keyof T]
9+
810
export interface Bot {
911
id: string
1012
name: string
@@ -32,7 +34,7 @@ export interface Bot {
3234
owners: User[] | string[]
3335
}
3436

35-
export type BotEnforcementKeys = 'JOIN_ENFORCED' | 'JOIN_PARTIALLY_ENFORCED'
37+
export type BotEnforcementKeys = ValueOf<typeof botEnforcements>
3638

3739
export interface RawGuild {
3840
id: string

utils/Constants.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ export const botCategoryDescription = {
121121
}
122122

123123
export const botEnforcements = {
124-
'서버 참여가 강제되는 명령어가 있습니다': 'JOIN_PARTIALLY_ENFORCED',
124+
'서버 참여가 강제되는 기능이 있습니다': 'JOIN_PARTIALLY_ENFORCED',
125125
'서버 참여 없이는 봇의 핵심 기능을 사용할 수 없습니다': 'JOIN_ENFORCED',
126-
}
126+
'라이선스 구매가 필요한 기능이 있습니다': 'LICENSE_PARTIALLY_ENFORCED',
127+
'라이선스 구매 없이는 봇의 핵심 기능을 사용할 수 없습니다': 'LICENSE_ENFORCED',
128+
} as const
127129

128130
export const botCategoryIcon = {
129131
관리: 'fas fa-cogs',

0 commit comments

Comments
 (0)