mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 08:17:47 +00:00
Fix Member.mentioned_in returning True if in separate guilds
This commit is contained in:
parent
527b3485dc
commit
f1118273f5
@ -53,7 +53,7 @@ class VoiceState:
|
||||
self_stream: :class:`bool`
|
||||
Indicates if the user is currently streaming via 'Go Live' feature.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
self_video: :class:`bool`
|
||||
Indicates if the user is currently broadcasting video.
|
||||
@ -389,12 +389,14 @@ class Member(discord.abc.Messageable, _BaseUser):
|
||||
message: :class:`Message`
|
||||
The message to check if you're mentioned in.
|
||||
"""
|
||||
if message.guild is None or message.guild.id != self.guild.id:
|
||||
return False
|
||||
|
||||
if self._user.mentioned_in(message):
|
||||
return True
|
||||
|
||||
for role in message.role_mentions:
|
||||
has_role = utils.get(self.roles, id=role.id) is not None
|
||||
if has_role:
|
||||
if self._roles.has(role.id):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user