From a94b1d3f9ea5ce435f92c21e1964aa19b17eaaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Calder=C3=B3n?= Date: Tue, 13 Aug 2024 17:26:57 -0300 Subject: [PATCH] Banned users can't use wizard to create new orders --- bot/modules/orders/commands.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/modules/orders/commands.js b/bot/modules/orders/commands.js index 1e9f4c63..a62fce99 100644 --- a/bot/modules/orders/commands.js +++ b/bot/modules/orders/commands.js @@ -170,7 +170,11 @@ async function enterWizard(ctx, user, type) { if (comm.currencies.length === 1) { state.currency = comm.currencies[0]; } + // We verify if the user is not banned on this community + if (await isBannedFromCommunity(user, user.default_community_id)) + return await messages.bannedUserErrorMessage(ctx, user); } + await ctx.scene.enter(Scenes.CREATE_ORDER, state); }