Skip to content

Commit

Permalink
chore: run format
Browse files Browse the repository at this point in the history
  • Loading branch information
SkellyBG committed Feb 20, 2024
1 parent d1d9d6e commit a7f4e60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
10 changes: 7 additions & 3 deletions cogs/answers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
await bot.add_cog(Answers(bot))
13 changes: 8 additions & 5 deletions cogs/teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from discord import app_commands
from discord import Guild


class Team(commands.GroupCog):
def __init__(self, bot):
self.bot = bot
Expand All @@ -16,28 +17,30 @@ 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)
await category.create_voice_channel(name=team_name)

# 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))
await bot.add_cog(Team(bot))

0 comments on commit a7f4e60

Please sign in to comment.