diff options
author | 2021-08-24 16:19:49 +0100 | |
---|---|---|
committer | 2021-08-24 16:42:33 +0100 | |
commit | dc92d6e767931e1a6be01ff35b5bb60d603274d2 (patch) | |
tree | ca2eb0fc8598346adee9c0a2efa7adec1d66ad9f | |
parent | Minor linting fixes (diff) |
Ignore partners & members of the python community as well as staff from `!liststream`
-rw-r--r-- | bot/exts/moderation/stream.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bot/exts/moderation/stream.py b/bot/exts/moderation/stream.py index 07ee4099e..e667006ff 100644 --- a/bot/exts/moderation/stream.py +++ b/bot/exts/moderation/stream.py @@ -9,7 +9,7 @@ from async_rediscache import RedisCache from discord.ext import commands from bot.bot import Bot -from bot.constants import Colours, Emojis, Guild, MODERATION_ROLES, Roles, STAFF_ROLES, VideoPermission +from bot.constants import Colours, Emojis, Guild, MODERATION_ROLES, Roles, STAFF_PARTNERS_COMMUNITY_ROLES, VideoPermission from bot.converters import Expiry from bot.pagination import LinePaginator from bot.utils.scheduling import Scheduler @@ -193,17 +193,19 @@ class Stream(commands.Cog): @commands.command(aliases=('lstream',)) @commands.has_any_role(*MODERATION_ROLES) async def liststream(self, ctx: commands.Context) -> None: - """Lists all non-staff users who have permission to stream.""" - non_staff_members_with_stream = [ + """ + Lists all users who aren't staff, partners or members of the python community and have permission to stream. + """ + non_staff_partners_community_members_with_stream = [ member for member in ctx.guild.get_role(Roles.video).members - if not any(role.id in STAFF_ROLES for role in member.roles) + if not any(role.id in STAFF_PARTNERS_COMMUNITY_ROLES for role in member.roles) ] # List of tuples (UtcPosixTimestamp, str) # So that the list can be sorted on the UtcPosixTimestamp before the message is passed to the paginator. streamer_info = [] - for member in non_staff_members_with_stream: + for member in non_staff_partners_community_members_with_stream: if revoke_time := await self.task_cache.get(member.id): # Member only has temporary streaming perms revoke_delta = Arrow.utcfromtimestamp(revoke_time).humanize() |