Fixed issue where users could register in PMs and with `me`

master
Joey Hines 2019-09-29 07:47:45 -05:00
parent 79a5efa984
commit 6a45fe217a
1 changed files with 9 additions and 3 deletions

View File

@ -496,6 +496,7 @@ class GeoffreyCommands(commands.Cog):
message = ["{}, you have the following locations:".format(ctx.message.author.mention)]
if locations:
for location in locations:
message.append(formatted_location(location))
@ -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)