From e6d58309d3c6161b7a57db1c4ed5409d6808c301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=A8=D0=B8?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD=D1=81=D0=BA=D0=B8=D0=B9?= Date: Sat, 4 Nov 2023 22:00:36 +0300 Subject: [PATCH] hotfix: error "Webhook not found" --- Justice.cs | 2 +- Justice/Interactions/PassportInteraction.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Justice.cs b/Justice.cs index 8abbef9..f956532 100644 --- a/Justice.cs +++ b/Justice.cs @@ -38,7 +38,7 @@ namespace DiscordApp } public async Task onReady() { - ChangeNicknames(); + await ChangeNicknames(); var myTimer = new System.Timers.Timer(6 * 60 * 60 * 1000); //calculate six hours in milliseconds myTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent); myTimer.Start(); diff --git a/Justice/Interactions/PassportInteraction.cs b/Justice/Interactions/PassportInteraction.cs index 97e7d9d..afee20e 100644 --- a/Justice/Interactions/PassportInteraction.cs +++ b/Justice/Interactions/PassportInteraction.cs @@ -28,6 +28,7 @@ namespace DiscordApp.Justice.Interactions [ModalInteraction("reworkpassportModal")] public async Task reCreatePassportInteraction(IReWorkPassportModal modal) { + await DeferAsync(true); int passportId; int.TryParse(modal.Id, out passportId); @@ -115,6 +116,7 @@ namespace DiscordApp.Justice.Interactions [ModalInteraction("ReNewPassportModal")] public async Task renewPassportInteraction(INewPassportModal modal) { + await DeferAsync(true); string name = modal.NickName; string RpName = modal.RPName; @@ -241,6 +243,7 @@ namespace DiscordApp.Justice.Interactions [ModalInteraction("passportModal")] public async Task createPassportInteraction(INewPassportModal modal) { + await DeferAsync(true); string name = modal.NickName; string RpName = modal.RPName;