From bde8b31cf9f6b3a430842c5590a53cf2716405e1 Mon Sep 17 00:00:00 2001 From: Matthieu Jolimaitre Date: Tue, 13 Aug 2024 19:08:59 +0200 Subject: [PATCH] add fail proof dissociation --- src/main.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 58ee3e1..4c5be18 100755 --- a/src/main.ts +++ b/src/main.ts @@ -124,7 +124,12 @@ class Service { } async dissociation_procedure(discord_user_id: string): Promise { - await this.state.remove_user(discord_user_id); + try { + await this.state.remove_user(discord_user_id); + } catch (error) { + console.error(error); + return `${error}`; + } return true; } }