Some small cleanups
This commit is contained in:
4
bot.py
4
bot.py
@@ -94,7 +94,7 @@ async def on_message(message: discord.Message):
|
||||
await loeh.edit(mute=False)
|
||||
if message is not None:
|
||||
await message.edit(content="~~Zu Befehl!~~\nEs sei ihm verziehen.")
|
||||
except (discord.Forbidden, discord.HTTPException) as error:
|
||||
except (discord.Forbidden, discord.HTTPException):
|
||||
await message.channel.send('Failed to complete your command, Sir')
|
||||
return
|
||||
elif PING_REGEX.search(message.content):
|
||||
@@ -147,7 +147,7 @@ async def config_prefix_command(ctx: commands.Context, cmd: str = '', key: str =
|
||||
config['loeh-timeout'] = int(val)
|
||||
save_config()
|
||||
await ctx.send('Config successfully updated')
|
||||
except (ValueError, TypeError) as error:
|
||||
except (ValueError, TypeError):
|
||||
await ctx.send('Invalid value "' + val + '" for config `' + key + '`')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user