From 3b5707cd15157f33e31a460b5ad04241ac23c298 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Thu, 3 Aug 2017 22:26:45 +0000 Subject: [PATCH] Hotfix for webhooks not showing up in the embeds. Message author object sometimes gives User for webhooks. User objects does not have nicknames. Check if the user/author object has nick attribute. --- discordbot/titanembeds/database/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discordbot/titanembeds/database/__init__.py b/discordbot/titanembeds/database/__init__.py index bca6b8b..8b3b2c0 100644 --- a/discordbot/titanembeds/database/__init__.py +++ b/discordbot/titanembeds/database/__init__.py @@ -69,7 +69,7 @@ class DatabaseInterface(object): def get_message_author(self, message): author = message.author - if author.nick is not None: + if hasattr(author, 'nick') and author.nick: author.name = author.nick obj = { "username": author.name,