fix: use username instead of globalName (#567)

* fix: use username instead of globalName

* fix: show username on owner
This commit is contained in:
SKINMAKER 2023-06-20 20:54:28 +09:00 committed by GitHub
parent 50168f6cd3
commit 5cf8cf48ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -9,8 +9,8 @@ const Owner: React.FC<OwnerProps> = ({ id, globalName, username, tag, crown=fals
<DiscordAvatar userID={id} className='z-negative absolute inset-0 w-full h-full' />
</div>
<div className='flex-1 w-0 leading-snug'>
<h4 className='whitespace-nowrap truncate'>{ crown && <i className='fas fa-crown text-amber-300 text-xs' /> }{globalName}</h4>
<span className='text-gray-600 text-sm'>{tag !== '0' ? '#' + tag : '@' + username}</span>
<h4 className='whitespace-nowrap truncate'>{ crown && <i className='fas fa-crown text-amber-300 text-xs' /> }{tag === '0' ? globalName : username}</h4>
<span className='text-gray-600 text-sm'>{tag === '0' ? '@' + username : '#' + tag}</span>
</div>
</a>
</Link>

View File

@ -82,7 +82,7 @@ const AddBot:NextPage<AddBotProps> = ({ logged, user, csrfToken, theme }) => {
}} />
<h1 className='text-3xl font-bold'> </h1>
<div className='mt-1 mb-5'>
, <span className='font-semibold'>{user.tag === '0' ? `@${user.username}` : `${user.globalName}#${user.tag}`}</span>! <a role='button' tabIndex={0} onKeyDown={toLogin} onClick={toLogin} className='text-discord-blurple cursor-pointer outline-none'> ?</a>
, <span className='font-semibold'>{user.tag === '0' ? `@${user.username}` : `${user.username}#${user.tag}`}</span>! <a role='button' tabIndex={0} onKeyDown={toLogin} onClick={toLogin} className='text-discord-blurple cursor-pointer outline-none'> ?</a>
</div>
{
data ? data.code == 200 && data.data ? <Message type='success'>

View File

@ -37,7 +37,7 @@ const UserReport = RequestHandler().post(limiter)
})
if(!validated) return
await getReportChannel().send({ content: `Reported by <@${user}> (${user})\nReported **${userInfo.tag === '0' ? userInfo.globalName + ' @' + userInfo.username : userInfo.globalName + '#' + userInfo.tag} <@${userInfo.id}> (${userInfo.id})\nCategory ${req.body.category}\nDesc\n\`\`\`${req.body.description}\`\`\``, allowedMentions: { parse: ['users'] }})
await getReportChannel().send({ content: `Reported by <@${user}> (${user})\nReported **${userInfo.tag === '0' ? userInfo.globalName + ' @' + userInfo.username : userInfo.username + '#' + userInfo.tag} <@${userInfo.id}> (${userInfo.id})\nCategory ${req.body.category}\nDesc\n\`\`\`${req.body.description}\`\`\``, allowedMentions: { parse: ['users'] }})
return ResponseWrapper(res, { code: 200, message: '성공적으로 처리되었습니다.' })
})

View File

@ -60,7 +60,7 @@ const Users: NextPage<UserProps> = ({ user, data }) => {
<div>
{
(data.tag !== '0') ? <div className='lg:flex mt-3 mb-1 '>
<h1 className='text-4xl font-bold'>{data.globalName}</h1>
<h1 className='text-4xl font-bold'>{data.username}</h1>
<span className='ml-0.5 text-gray-400 text-3xl font-semibold mt-1'>#{data.tag}</span>
</div> : <div className='lg:flex mt-3 mb-1 flex-col'>
<h1 className='text-4xl font-bold'>{data.globalName}</h1>