Fixed issue in sending error messages.

doc_update
Joey Hines 2018-07-22 19:01:49 -05:00
parent 93827f5f90
commit a13e1c9af2
2 changed files with 3 additions and 8 deletions

View File

@ -44,9 +44,6 @@ class Commands:
base = self.interface.add_base(session, player, base_name, x_pos, z_pos)
base_name = base.name
except EntryNameNotUniqueError:
session.rollback()
raise EntryNameNotUniqueError
finally:
session.close()
@ -81,9 +78,6 @@ class Commands:
tunnel = self.interface.add_tunnel(session, player, tunnel_color, tunnel_number, location_name)
tunnel_info = tunnel.__str__()
except EntryNameNotUniqueError:
session.rollback()
raise EntryNameNotUniqueError
finally:
session.close()

View File

@ -48,7 +48,8 @@ async def on_command_error(error, ctx):
else:
error_str = bad_error_message.format(ctx.invoked_with, error)
bot.send_message(ctx.message.channel, '**Error Running Command:** {}'.format(error_str))
await bot.send_message(ctx.message.channel, '{} **Error Running Command:** {}'.format(ctx.message.author.mention,
error_str))
@bot.command()