info now handles spaces in names
parent
b715d9e0b9
commit
2dd1df3b09
|
@ -287,7 +287,7 @@ async def selling(ctx, item_name: str):
|
||||||
|
|
||||||
|
|
||||||
@bot.command(pass_context=True)
|
@bot.command(pass_context=True)
|
||||||
async def info(ctx, name: str):
|
async def info(ctx, * args):
|
||||||
'''
|
'''
|
||||||
Displays info about a location.
|
Displays info about a location.
|
||||||
|
|
||||||
|
@ -296,6 +296,7 @@ async def info(ctx, name: str):
|
||||||
?info [Location Name]
|
?info [Location Name]
|
||||||
'''
|
'''
|
||||||
try:
|
try:
|
||||||
|
name = ' '.join(args)
|
||||||
loc = database_interface.find_location_by_name(name)[0]
|
loc = database_interface.find_location_by_name(name)[0]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
await bot.say('{}, no locations in the database match {}.'.format(ctx.message.author.mention, name))
|
await bot.say('{}, no locations in the database match {}.'.format(ctx.message.author.mention, name))
|
||||||
|
|
Loading…
Reference in New Issue