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__":