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.

This commit is contained in:
Jeremy Zhang 2017-08-03 22:26:45 +00:00
parent b91b3821a4
commit 3b5707cd15

View File

@ -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,