From b65c80b82e8f79e3445f3547c0cff35b3cf2a386 Mon Sep 17 00:00:00 2001 From: i_iMikey <67828573+MikeyUsersREC@users.noreply.github.com> Date: Sun, 25 Feb 2024 20:39:25 +0000 Subject: [PATCH] Fixing --- cogs/Actions.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cogs/Actions.py b/cogs/Actions.py index e91f3e09..bb56e5b9 100644 --- a/cogs/Actions.py +++ b/cogs/Actions.py @@ -71,6 +71,8 @@ async def action_execute(self, ctx: commands.Context, action: str): if '--verbose' in action: action = action.replace(' --verbose', '') verbose = True + ctx.verbose = verbose + actions = [i async for i in self.bot.actions.db.find({'Guild': ctx.guild.id})] or [] action_obj = None for item in actions: @@ -243,7 +245,7 @@ async def send_erlc_command(bot, guild_id: int, context, command: str): command = ':' + command command_response = await bot.prc_api.run_command(guild_id, command) - return 0 if command_response[0] == 200 else 1 + return 0 if command_response[0] == 200 else (1 and (await context.send(command_response[1]) if context.verbose else 'A')) @staticmethod @@ -254,7 +256,7 @@ async def send_erlc_message(bot, guild_id: int, context, message: str): message = message[2:] command_response = await bot.prc_api.run_command(guild_id, f':m {message}') - return 0 if command_response[0] == 200 else 1 + return 0 if command_response[0] == 200 else (1 and (await context.send(command_response[1]) if context.verbose else 'A')) @staticmethod async def send_erlc_hint(bot, guild_id: int, context, hint: str): @@ -262,7 +264,7 @@ async def send_erlc_hint(bot, guild_id: int, context, hint: str): hint = hint[3:] command_response = await bot.prc_api.run_command(guild_id, f':h {hint}') - return 0 if command_response[0] == 200 else 1 + return 0 if command_response[0] == 200 else (1 and (await context.send(command_response[1]) if context.verbose else 'A')) @staticmethod async def delay(bot, guild_id, context, timer: int):