style: fix deepscan

This commit is contained in:
wonderlandpark 2021-05-22 16:13:45 +09:00
parent 273bed7e0c
commit 522cfc02c8
3 changed files with 3 additions and 3 deletions

View File

@ -136,7 +136,7 @@ const Bots = RequestHandler()
{ prefix: bot.prefix, library: bot.lib, web: bot.web, git: bot.git, url: bot.url, discord: bot.discord, intro: bot.intro, category: JSON.stringify(bot.category) }, { prefix: bot.prefix, library: bot.lib, web: bot.web, git: bot.git, url: bot.url, discord: bot.discord, intro: bot.intro, category: JSON.stringify(bot.category) },
{ prefix: validated.prefix, library: validated.library, web: validated.website, git: validated.git, url: validated.url, discord: validated.discord, intro: validated.intro, category: JSON.stringify(validated.category) } { prefix: validated.prefix, library: validated.library, web: validated.website, git: validated.git, url: validated.url, discord: validated.discord, intro: validated.intro, category: JSON.stringify(validated.category) }
) )
diffData.map(d => { diffData.forEach(d => {
embed.addField(d[0], makeDiscordCodeblock(diff(d[1][0] || '', d[1][1] || ''), 'diff')) embed.addField(d[0], makeDiscordCodeblock(diff(d[1][0] || '', d[1][1] || ''), 'diff'))
}) })
await discordLog('BOT/EDIT', user, embed, await discordLog('BOT/EDIT', user, embed,

View File

@ -19,7 +19,7 @@ const ApproveBotSubmit = RequestHandler()
get.botSubmit.clear(JSON.stringify({ id: req.query.id, date: req.query.date })) get.botSubmit.clear(JSON.stringify({ id: req.query.id, date: req.query.date }))
get.bot.clear(req.query.id) get.bot.clear(req.query.id)
const embed = new MessageEmbed().setTitle('승인').setColor('GREEN').setDescription(`[${submit.id}/${submit.date}](${KoreanbotsEndPoints.URL.submittedBot(submit.id, submit.date)})`).setTimestamp() const embed = new MessageEmbed().setTitle('승인').setColor('GREEN').setDescription(`[${submit.id}/${submit.date}](${KoreanbotsEndPoints.URL.submittedBot(submit.id, submit.date)})`).setTimestamp()
if(req.body.note) embed.addField('📃 정보', `${req.body.note ? `${req.body.note}` : ''}`) if(req.body.note) embed.addField('📃 정보', req.body.note)
await getBotReviewLogChannel().send(embed) await getBotReviewLogChannel().send(embed)
return ResponseWrapper(res, { code: 200 }) return ResponseWrapper(res, { code: 200 })
}) })

View File

@ -25,7 +25,7 @@ export const discordLog = async (type: string, issuerID: string, embed?: Discord
content: `[${type}] <@${issuerID}> (${issuerID})\n${content || ''}`, content: `[${type}] <@${issuerID}> (${issuerID})\n${content || ''}`,
embed: embed && embed.setTitle(type).setTimestamp(new Date()), embed: embed && embed.setTitle(type).setTimestamp(new Date()),
...(attachment && { files: [ ...(attachment && { files: [
attachment && new Discord.MessageAttachment(Buffer.from(attachment.content), `${type.toLowerCase().replace(/\//g, '-')}-${issuerID}-${Date.now()}.${attachment.format}`) new Discord.MessageAttachment(Buffer.from(attachment.content), `${type.toLowerCase().replace(/\//g, '-')}-${issuerID}-${Date.now()}.${attachment.format}`)
] ]
}) })
}) })