mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 06:10:22 +00:00
fix: do not set state deleted if api is unreachable
This commit is contained in:
parent
84b0863d0e
commit
98aa7646b6
@ -76,7 +76,10 @@ async function getBot(id: string, topLevel = true): Promise<Bot> {
|
||||
|
||||
if (res) {
|
||||
const discordBot = await get.discord.user.load(res.id)
|
||||
if (!discordBot || Number(discordBot.discriminator) === 0) {
|
||||
if(!discordBot) {
|
||||
return null
|
||||
}
|
||||
if (Number(discordBot.discriminator) === 0) {
|
||||
knex('bots')
|
||||
.update({ state: 'deleted' })
|
||||
.where({ id })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user