Fixed issue where users could register in PMs and with `me`
parent
79a5efa984
commit
6a45fe217a
|
@ -496,8 +496,9 @@ class GeoffreyCommands(commands.Cog):
|
|||
|
||||
message = ["{}, you have the following locations:".format(ctx.message.author.mention)]
|
||||
|
||||
for location in locations:
|
||||
message.append(formatted_location(location))
|
||||
if locations:
|
||||
for location in locations:
|
||||
message.append(formatted_location(location))
|
||||
|
||||
await self.bot.send_list(ctx, message)
|
||||
|
||||
|
@ -507,9 +508,14 @@ class GeoffreyCommands(commands.Cog):
|
|||
{}register
|
||||
"""
|
||||
errors = {
|
||||
"PlayerInDBError": "you are already registered with Geoffrey you ding dong."
|
||||
"PlayerInDBError": "you are already registered with Geoffrey you ding dong.",
|
||||
"UsernameLookupFailed": "could not find a MC user from your username. Have a mod update your nickname."
|
||||
}
|
||||
|
||||
if ctx.message.guild is None:
|
||||
await ctx.send("{}, You can not register for geoffrey in the DMs!".format(ctx.message.author.mention))
|
||||
return
|
||||
|
||||
await run_command(ctx, self.api_url, self.api_token, "POST", "register", errors=errors,
|
||||
player_name=ctx.message.author.display_name,
|
||||
discord_uuid=ctx.message.author.id)
|
||||
|
|
Loading…
Reference in New Issue