From 24b7944f1a6438976cfccd5b72eb94527795c600 Mon Sep 17 00:00:00 2001 From: kevincaires Date: Sun, 21 Aug 2022 17:57:39 -0300 Subject: [PATCH 1/2] FIX role permission for the command. --- utils/commands.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/commands.py b/utils/commands.py index 375f325..989df66 100644 --- a/utils/commands.py +++ b/utils/commands.py @@ -294,6 +294,11 @@ async def machine_info(bot: object, *args: str) -> str: supported_args = [ 'network' ] + roles = [r.name for r in bot.author.roles] + + if 'BotMan' not in roles: + return await bot.send("_And who the fuck do **YOU** think you are!?_.\n"\ + "(You don't have the necessary role for this command)") if not args: embed.add_field(name='CPU', value=f'{Monitor.cpu_percent} %') @@ -302,6 +307,7 @@ async def machine_info(bot: object, *args: str) -> str: embed.add_field(name='Disk total', value=f'{kbytes_to_gbytes(Monitor.disk_usage.total)} Gb') embed.add_field(name='Disk used', value=f'{kbytes_to_gbytes(Monitor.disk_usage.used)} Gb') embed.add_field(name='Disk free', value=f'{kbytes_to_gbytes(Monitor.disk_usage.free)} Gb') + return await bot.send('**`Monitor`**', embed=embed) if args[0] not in supported_args: return await bot.send('The argument is not supported!') @@ -322,5 +328,3 @@ async def machine_info(bot: object, *args: str) -> str: await bot.send(f'**`{io}`**', embed=embed) return - - return await bot.send('**`Monitor`**', embed=embed) From 6beee1d885beb32f749325991a4a494bdd6c9fb1 Mon Sep 17 00:00:00 2001 From: kevincaires Date: Sun, 21 Aug 2022 17:57:48 -0300 Subject: [PATCH 2/2] CHANGE version. --- motd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/motd b/motd index 4c49fc8..5395e2b 100644 --- a/motd +++ b/motd @@ -5,7 +5,7 @@ █ ▄ █ ▄▄▄█ ▄▄▄█ ▄ ██ █▄▄▄█ ▄▄▄█ █ █ █ █ █▄▄▄█ █▄▄▄█ █▄█ █ █ █▄▄▄ █▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█ -Neeble version: 2022.08.20e +Neeble version: 2022.08.21b You can help the development of neeble in https://github.com/KevinCaires/neeble Thank you! \ No newline at end of file