diff options
| author | 2021-07-08 23:14:47 +0300 | |
|---|---|---|
| committer | 2021-07-08 23:14:47 +0300 | |
| commit | bc390bcb66d060aeba29c835d6c5cceb3d366626 (patch) | |
| tree | 668a05ba55077669a9645c54c0294997b53161a2 | |
| parent | More code jam functionality (diff) | |
Added command to remove from team
| -rw-r--r-- | bot/exts/events/code_jams/_cog.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bot/exts/events/code_jams/_cog.py b/bot/exts/events/code_jams/_cog.py index 39577a5c3..862e53a13 100644 --- a/bot/exts/events/code_jams/_cog.py +++ b/bot/exts/events/code_jams/_cog.py @@ -149,6 +149,18 @@ class CodeJams(commands.Cog): f"Participant moved from `{self.team_name(old_team_channel)}` to `{self.team_name(new_team_channel)}`." ) + @codejam.command() + @commands.has_any_role(Roles.admins) + async def remove(self, ctx: commands.Context, member: Member) -> None: + """Removes the participant from their team. Does not remove the participants or leader roles.""" + channel = self.team_channel(ctx.guild, member) + if not channel: + await ctx.send(":x: I can't find the team channel for this member.") + return + + await channel.set_permissions(member, overwrite=None, reason="Participant removed from the team.") + await ctx.send(f"Removed the participant from `{self.team_name(channel)}`.") + @staticmethod def jam_categories(guild: Guild) -> list[discord.CategoryChannel]: """Get all the code jam team categories.""" |