Fixed a broken error message in ?delete_item
parent
7a3eb8d112
commit
78fd5a7cc7
|
@ -241,8 +241,6 @@ class Commands:
|
||||||
except DataError:
|
except DataError:
|
||||||
session.rollback()
|
session.rollback()
|
||||||
raise DatabaseValueError
|
raise DatabaseValueError
|
||||||
except IndexError:
|
|
||||||
raise LocationLookUpError
|
|
||||||
finally:
|
finally:
|
||||||
session.close()
|
session.close()
|
||||||
|
|
||||||
|
@ -253,7 +251,7 @@ class Commands:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
player = self.get_player(session, discord_uuid=discord_uuid, mc_uuid=mc_uuid)
|
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:
|
if location.tunnel is not None:
|
||||||
location.tunnel.tunnel_direction = TunnelDirection.str_to_tunnel_dir(tunnel_direction)
|
location.tunnel.tunnel_direction = TunnelDirection.str_to_tunnel_dir(tunnel_direction)
|
||||||
|
|
|
@ -47,11 +47,10 @@ class Delete_Commands:
|
||||||
|
|
||||||
await ctx.send('{}, **{}** has been removed from the inventory of **{}**.'.
|
await ctx.send('{}, **{}** has been removed from the inventory of **{}**.'.
|
||||||
format(ctx.message.author.mention, item, shop_name))
|
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:
|
except NoLocationsInDatabase:
|
||||||
if shop is None:
|
await ctx.send('{}, you do have any shops in the database.'.format(ctx.message.author.mention))
|
||||||
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))
|
|
||||||
except EntryNameNotUniqueError:
|
except EntryNameNotUniqueError:
|
||||||
await ctx.send('{}, you have more than one shop in the database, please specify a shop name.'
|
await ctx.send('{}, you have more than one shop in the database, please specify a shop name.'
|
||||||
.format(ctx.message.author.mention))
|
.format(ctx.message.author.mention))
|
||||||
|
|
Loading…
Reference in New Issue