mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Change Role.is_everyone to Role.is_default.
This commit is contained in:
@ -135,8 +135,8 @@ class Role(Hashable):
|
||||
self.mentionable = data.get('mentionable', False)
|
||||
self.color = self.colour
|
||||
|
||||
def is_everyone(self):
|
||||
"""Checks if the role is the @everyone role."""
|
||||
def is_default(self):
|
||||
"""Checks if the role is the default role."""
|
||||
return self.guild.id == self.id
|
||||
|
||||
@property
|
||||
@ -153,7 +153,7 @@ class Role(Hashable):
|
||||
def members(self):
|
||||
"""Returns a list of :class:`Member` with this role."""
|
||||
all_members = self.guild.members
|
||||
if self.is_everyone():
|
||||
if self.is_default():
|
||||
return all_members
|
||||
|
||||
ret = []
|
||||
@ -167,7 +167,7 @@ class Role(Hashable):
|
||||
if position <= 0:
|
||||
raise InvalidArgument("Cannot move role to position 0 or below")
|
||||
|
||||
if self.is_everyone():
|
||||
if self.is_default():
|
||||
raise InvalidArgument("Cannot move default role")
|
||||
|
||||
if self.position == position:
|
||||
|
Reference in New Issue
Block a user