Fixed a broken error message in ?delete_item

doc_update
Joey Hines 2018-09-30 15:13:48 -05:00
parent 7a3eb8d112
commit 78fd5a7cc7
2 changed files with 4 additions and 7 deletions

View File

@ -241,8 +241,6 @@ class Commands:
except DataError:
session.rollback()
raise DatabaseValueError
except IndexError:
raise LocationLookUpError
finally:
session.close()
@ -253,7 +251,7 @@ class Commands:
try:
player = self.get_player(session, discord_uuid=discord_uuid, mc_uuid=mc_uuid)
location = self.interface.find_location_by_name_and_owner(session, player, loc_name)[0]
location = self.get_location(session, player, loc_name)
if location.tunnel is not None:
location.tunnel.tunnel_direction = TunnelDirection.str_to_tunnel_dir(tunnel_direction)

View File

@ -47,11 +47,10 @@ class Delete_Commands:
await ctx.send('{}, **{}** has been removed from the inventory of **{}**.'.
format(ctx.message.author.mention, item, shop_name))
except LocationLookUpError:
await ctx.send('{}, you do not have a shop called **{}**.'.format(ctx.message.author.mention, shop))
except NoLocationsInDatabase:
if shop is None:
await ctx.send('{}, you do have any shops in the database.'.format(ctx.message.author.mention))
else:
await ctx.send('{}, you do not have a shop called **{}**.'.format(ctx.message.author.mention, shop))
await ctx.send('{}, you do have any shops in the database.'.format(ctx.message.author.mention))
except EntryNameNotUniqueError:
await ctx.send('{}, you have more than one shop in the database, please specify a shop name.'
.format(ctx.message.author.mention))