diff --git a/motd b/motd index c65aead..80a2153 100644 --- a/motd +++ b/motd @@ -5,7 +5,7 @@ █ ▄ █ ▄▄▄█ ▄▄▄█ ▄ ██ █▄▄▄█ ▄▄▄█ █ █ █ █ █▄▄▄█ █▄▄▄█ █▄█ █ █ █▄▄▄ █▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█ -Neeble version: 2023.10.09c +Neeble version: 2023.10.09d Help with the development of neeble-bot in https://brejela.club/gitea/neeble-club/neeble Thank you! diff --git a/utils/commands.py b/utils/commands.py index ab2991f..dd75c7f 100644 --- a/utils/commands.py +++ b/utils/commands.py @@ -567,7 +567,8 @@ async def roulette(bot:object, *option:str) -> str: spin = 0 if comlock['roulette'] == True: - return await bot.send(bot.author.name + " has hit command lock") + await bot.send(bot.author.name + " has hit command lock") + return 0 if 'lb' in option: with open(ROULETTE_LEADERBOARD, mode='r') as file: @@ -596,9 +597,9 @@ async def roulette(bot:object, *option:str) -> str: await bot.send(f"BANG! {bot.author.name} died.") russians[bot.author.name] = 0 for r in russians.keys(): - if bot.author.name in roulette_leaderboard.keys(): + try: roulette_leaderboard[r] += russians[r] - else: + except KeyError: roulette_leaderboard[r] = russians[r] with open(ROULETTE_LEADERBOARD, mode='w') as file: json.dump(roulette_leaderboard, file)