fix: do not send vanity log when no changes are made

This commit is contained in:
skinmaker1345 2025-06-21 19:07:36 +09:00
parent 221a19ce64
commit e3aea944bf

View File

@ -246,28 +246,29 @@ const Bots = RequestHandler()
errors: ['다른 커스텀 URL로 다시 시도해주세요.'], errors: ['다른 커스텀 URL로 다시 시도해주세요.'],
}) })
} }
if (validated.vanity !== bot.vanity) {
await webhookClients.internal.noticeLog.send({ await webhookClients.internal.noticeLog.send({
embeds: [ embeds: [
{ {
title: '한디리 커스텀 URL 변경', title: '한디리 커스텀 URL 변경',
description: `봇: ${bot.name} - <@${bot.id}> ([${bot.id}](${KoreanbotsEndPoints.URL.bot( description: `봇: ${bot.name} - <@${bot.id}> ([${
bot.id bot.id
)}))`, }](${KoreanbotsEndPoints.URL.bot(bot.id)}))`,
fields: [ fields: [
{ {
name: '이전', name: '이전',
value: bot.vanity || '없음', value: bot.vanity || '없음',
}, },
{ {
name: '이후', name: '이후',
value: validated.vanity || '없음', value: validated.vanity || '없음',
}, },
], ],
color: Colors.Blue, color: Colors.Blue,
}, },
], ],
}) })
}
} }
const result = await update.bot(req.query.id, validated) const result = await update.bot(req.query.id, validated)
if (result === 0) return ResponseWrapper(res, { code: 400 }) if (result === 0) return ResponseWrapper(res, { code: 400 })