Fix mentions with nicknames

This commit is contained in:
Jeremy Zhang
2017-08-10 02:56:45 +00:00
parent 77bde8f258
commit 68d8882d3e
3 changed files with 11 additions and 4 deletions

View File

@ -54,5 +54,10 @@ def get_channel_messages(guild_id, channel_id, after_snowflake=None):
message["author"]["nickname"] = None
if member:
message["author"]["nickname"] = member.nickname
for mention in message["mentions"]:
author = get_guild_member(guild_id, mention["id"])
mention["nickname"] = None
if author:
mention["nickname"] = author.nickname
msgs.append(message)
return msgs