From 78d97db224cec720c8d3627a0bf2babc3fdea719 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 28 Apr 2022 06:10:47 +0200 Subject: [PATCH] .modules commanad now has a medusa module description --- CHANGELOG.md | 1 + src/NadekoBot/Modules/Help/Help.cs | 2 ++ src/NadekoBot/_Extensions/IMessageChannelExtensions.cs | 7 +++++-- src/NadekoBot/data/strings/responses/responses.en-US.json | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e458b22af..8549cae89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog. - Fixed `.deletexp` command - `.give` command should send DMs again +- `.modules` commanad now has a medusa module description ## [4.1.2] - 16.04.2022 diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index 6f9563b8b..40ed362f8 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -129,6 +129,8 @@ public partial class Help : NadekoModule return strs.module_description_permissions; case "xp": return strs.module_description_xp; + case "medusa": + return strs.module_description_medusa; default: return strs.module_description_missing; } diff --git a/src/NadekoBot/_Extensions/IMessageChannelExtensions.cs b/src/NadekoBot/_Extensions/IMessageChannelExtensions.cs index 849b8d6c1..f4634a360 100644 --- a/src/NadekoBot/_Extensions/IMessageChannelExtensions.cs +++ b/src/NadekoBot/_Extensions/IMessageChannelExtensions.cs @@ -159,11 +159,14 @@ public static class MessageChannelExtensions { _ = Task.Run(async () => { - await si.DeferAsync(); if (si is not SocketMessageComponent smc) return; - if (smc.User.Id != ctx.User.Id || smc.Message.Id != msg.Id) + if (smc.Message.Id != msg.Id) + return; + + await si.DeferAsync(); + if (smc.User.Id != ctx.User.Id) return; if (smc.Data.CustomId == BUTTON_LEFT) diff --git a/src/NadekoBot/data/strings/responses/responses.en-US.json b/src/NadekoBot/data/strings/responses/responses.en-US.json index 460e0fbeb..87f573df4 100644 --- a/src/NadekoBot/data/strings/responses/responses.en-US.json +++ b/src/NadekoBot/data/strings/responses/responses.en-US.json @@ -960,6 +960,7 @@ "module_description_permissions": "Setup perms for commands, filter words and set up command cooldowns", "module_description_searches": "Search for jokes, images of animals, anime and manga", "module_description_xp": "Gain xp based on chat activity, check users' xp cards", + "module_description_medusa": "**Bot Owner only.** Load, unload and handle dynamic modules. Read more [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/)", "module_description_missing": "Description is missing for this module.", "obsolete_use": "⚠ Obsolete, use {0} instead.", "purge_user_confirm": "Are you sure that you want to purge {0} from the database?",