add log on error

This commit is contained in:
The Foxon 2023-06-28 03:52:07 +12:00
parent af5c7ff982
commit 320db6948c
4 changed files with 15 additions and 4 deletions

View File

@ -34,6 +34,8 @@ export default class ConfigManager {
this.guildId = t.guildId this.guildId = t.guildId
if (!!t?.userManager) if (!!t?.userManager)
this.userManager = { ...this.userManager, ...t.userManager } this.userManager = { ...this.userManager, ...t.userManager }
} catch (error) { } } catch (error) {
console.log(error)
}
} }
} }

View File

@ -27,7 +27,9 @@ export default class EcoManager {
if (status !== 200) return null if (status !== 200) return null
return data return data
} catch (error) { } } catch (error) {
console.log(error)
}
return null return null
} }
public async Message(message: string, from: string, to: string) { public async Message(message: string, from: string, to: string) {
@ -48,7 +50,9 @@ export default class EcoManager {
if (status !== 200) return null if (status !== 200) return null
return data return data
} catch (error) { } } catch (error) {
console.log(error)
}
return null return null
} }
} }

View File

@ -22,7 +22,9 @@ export default class UserManager {
this.config.userManager.users = data this.config.userManager.users = data
return true return true
} catch (error) { } } catch (error) {
console.log(error)
}
return false return false
} }
} }

View File

@ -69,11 +69,14 @@ client.on(Events.InteractionCreate, async interaction => {
await interaction.reply({ content: "Ошибка выполнения", ephemeral: true }) await interaction.reply({ content: "Ошибка выполнения", ephemeral: true })
else if (interaction.replied || interaction.deferred) else if (interaction.replied || interaction.deferred)
await interaction.editReply({ content: "Ошибка выполнения" }) await interaction.editReply({ content: "Ошибка выполнения" })
console.log(error)
} }
} else } else
return return
} catch (error) { } catch (error) {
// console.log(error) // console.log(error)
console.log(error)
} }
}); });