prevent duplicate user for interactions (#15)
This commit is contained in:
parent
84afc8c503
commit
bae2716aef
2 changed files with 2 additions and 1 deletions
|
@ -108,6 +108,7 @@ class Message:
|
||||||
self.content = message.get("content", "")
|
self.content = message.get("content", "")
|
||||||
self.id = message["id"]
|
self.id = message["id"]
|
||||||
self.webhook_id = message.get("webhook_id", "")
|
self.webhook_id = message.get("webhook_id", "")
|
||||||
|
self.application_id = message.get("application_id", "")
|
||||||
|
|
||||||
self.mentions = [
|
self.mentions = [
|
||||||
User(mention) for mention in message.get("mentions", [])
|
User(mention) for mention in message.get("mentions", [])
|
||||||
|
|
|
@ -490,7 +490,7 @@ class DiscordClient(Gateway):
|
||||||
Discord user.
|
Discord user.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if message.webhook_id:
|
if message.webhook_id and not message.application_id:
|
||||||
hashed = hash_str(message.author.username)
|
hashed = hash_str(message.author.username)
|
||||||
message.author.id = str(int(message.author.id) + hashed)
|
message.author.id = str(int(message.author.id) + hashed)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue