From 75887d5ab318d4a6eb82983fbe44da0314bdc6de Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 26 Mar 2017 14:10:32 +0200 Subject: [PATCH] fixed randrange for roll --- grandbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grandbot.py b/grandbot.py index 218f2f6e..cab300bf 100644 --- a/grandbot.py +++ b/grandbot.py @@ -459,7 +459,7 @@ Sintassi: `/roll `""" parse_mode="Markdown") return # Roll the dice! - await update.message.reply(bot, f"*Numero generato:* {random.randrange(0, arguments[0]) + 1}") + await update.message.reply(bot, f"*Numero generato:* {random.randrange(0, int(arguments[0])) + 1}") async def roll_discord(bot, message, arguments): @@ -471,7 +471,7 @@ Sintassi: `!roll `""" await bot.send_message(message.channel, "⚠ Sintassi del comando non valida.\n`!roll `") return # Roll the dice! - await bot.send_message(message.channel, f"*Numero generato:* {random.randrange(0, arguments[0]) + 1}") + await bot.send_message(message.channel, f"*Numero generato:* {random.randrange(0, int(arguments[0])) + 1}") if __name__ == "__main__":