refactor: do not filter keys to display enforcements

This commit is contained in:
skinmaker1345 2025-07-03 21:52:19 +09:00
parent 3e1e357802
commit 5260f85c03

View File

@ -9,9 +9,9 @@ import Tooltip from 'rc-tooltip'
import { SnowflakeUtil } from 'discord.js'
import { ParsedUrlQuery } from 'querystring'
import { Bot, BotEnforcementKeys, ResponseProps, Theme, User } from '@types'
import { Bot, ResponseProps, Theme, User } from '@types'
import { git, KoreanbotsEndPoints, reportCats, Status } from '@utils/Constants'
import { botEnforcements, git, KoreanbotsEndPoints, reportCats, Status } from '@utils/Constants'
import { get } from '@utils/Query'
import Day from '@utils/Day'
import { ReportSchema } from '@utils/Yup'
@ -120,15 +120,8 @@ const Bots: NextPage<BotsProps> = ({ data, desc, date, user, theme, csrfToken })
<Message type='warning'>
<h2 className='text-lg font-extrabold'> .</h2>
<p>
{Object.entries({
JOIN_ENFORCED:
'봇의 핵심 기능은 봇의 디스코드 서버에 참여해야 사용할 수 있습니다.',
JOIN_PARTIALLY_ENFORCED:
'봇의 일부 명령어는 봇의 디스코드 서버에 참여해야 사용할 수 있습니다.',
})
.filter((el) => data.enforcements.includes(el[0] as BotEnforcementKeys))
.map(([k, v]) => (
<li key={k}>{v}</li>
{data.enforcements.map((i) => (
<li key={i}>{botEnforcements[i].description}</li>
))}
</p>
</Message>