From 7c29e6e9b0c8ed742ab7587a58690146a6eef8c0 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Mon, 13 May 2019 09:52:15 -0500 Subject: [PATCH] Fixed register command and error user issue --- GeoffreyBot/geoffrey.py | 3 +++ GeoffreyBot/geoffrey_api.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/GeoffreyBot/geoffrey.py b/GeoffreyBot/geoffrey.py index bbc9201..f5eae1c 100644 --- a/GeoffreyBot/geoffrey.py +++ b/GeoffreyBot/geoffrey.py @@ -114,6 +114,9 @@ class GeoffreyBot(commands.Bot): for user_id in self.error_users: user = self.get_user(user_id) + if user is None: + continue + if msg is list: await self.send_list(user, msg) else: diff --git a/GeoffreyBot/geoffrey_api.py b/GeoffreyBot/geoffrey_api.py index b4a38b9..83ed2f0 100644 --- a/GeoffreyBot/geoffrey_api.py +++ b/GeoffreyBot/geoffrey_api.py @@ -540,10 +540,12 @@ class GeoffreyCommands(commands.Cog): "PlayerinDBError": "you are already registered with Geoffrey you ding dong." } - await run_command(self.base_url, self.api_token, "POST", "register", errors=errors, + await run_command(ctx, self.base_url, self.api_token, "POST", "register", errors=errors, player_name=ctx.message.author.display_name, discord_uuid=ctx.message.author.id) - await ctx.send("{}, you have been added to the database. Do {}help to see what this bot can do.") + await ctx.send("{}, you have been added to the database. Do {}help to see what this bot can do.", + ctx.message.author.mention, + self.bot.prefix) @commands.command(pass_context=True) async def remove_resident(self, ctx, resident_name, *args):