mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 18:11:23 +01:00
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:
parent
b91b3821a4
commit
3b5707cd15
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user