From a7f4e601a7fabc7a5c0a3fd1a1b3783aa8fdd7ef Mon Sep 17 00:00:00 2001 From: SkellyBG Date: Tue, 20 Feb 2024 18:56:29 +1100 Subject: [PATCH] chore: run format --- cogs/answers.py | 10 +++++++--- cogs/teams.py | 13 ++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/cogs/answers.py b/cogs/answers.py index e450469..eacd718 100644 --- a/cogs/answers.py +++ b/cogs/answers.py @@ -2,6 +2,7 @@ from discord.ext import commands from discord import app_commands + class Answers(commands.Cog): def __init__(self, bot): self.bot = bot @@ -13,14 +14,17 @@ def __init__(self, bot): "God's Kitchen": "what's the opposite of gordon ramsay", "Librinth": "books idk", "Susharks in the Wafer": "i'm kinda hungry", - "We Need to Eat": "aaaaaaaaanoodl" + "We Need to Eat": "aaaaaaaaanoodl", } @app_commands.command(name="check") # remember to add a check so that users can only check answers in their respective # team channels - async def check_answer(self, interaction: discord.Interaction, puzz_name: str, answer: str): + async def check_answer( + self, interaction: discord.Interaction, puzz_name: str, answer: str + ): pass + async def setup(bot: commands.Bot): - await bot.add_cog(Answers(bot)) \ No newline at end of file + await bot.add_cog(Answers(bot)) diff --git a/cogs/teams.py b/cogs/teams.py index 92d70a6..5d50da2 100644 --- a/cogs/teams.py +++ b/cogs/teams.py @@ -3,6 +3,7 @@ from discord import app_commands from discord import Guild + class Team(commands.GroupCog): def __init__(self, bot): self.bot = bot @@ -16,13 +17,12 @@ async def create_team(self, interaction: discord.Interaction, team_name: str): # include code to check that the name is not already taken # will involve a call to the respective sql function - # if name not taken, add check for profanity and such team_role = await Guild.create_role(guild, name=team_name) overwrites = { guild.default_role: discord.PermissionOverwrite(read_messages=False), - team_role: discord.PermissionOverwrite(read_messages=True) + team_role: discord.PermissionOverwrite(read_messages=True), } category = await Guild.create_category(guild, team_name, overwrites=overwrites) await category.create_text_channel(name=team_name) @@ -30,14 +30,17 @@ async def create_team(self, interaction: discord.Interaction, team_name: str): # give role to user await user.add_roles(team_role) - await interaction.response.send_message(f"Team \"{team_name}\" created successfully!") + await interaction.response.send_message( + f'Team "{team_name}" created successfully!' + ) @app_commands.command(name="leave") async def leave_team(self, interaction: discord.Interaction, team_name: str): # remove team role from user # if there are no more people in the team, delete the role and channels - + pass + async def setup(bot: commands.Bot): - await bot.add_cog(Team(bot)) \ No newline at end of file + await bot.add_cog(Team(bot))