Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions src/cmds/core/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,7 @@ async def start_here(self, ctx: ApplicationContext) -> Interaction | WebhookMess
return await ctx.respond(
"Get Started with the HTB Beginners Bible: https://www.hackthebox.com/blog/learn-to-hack-beginners-bible"
)

@slash_command(guild_ids=settings.guild_ids, name="sphere", default_permission=True)
async def sphere(
self, ctx: ApplicationContext, flag: Option(str, "What has the sphere revealed to you?")
) -> Interaction | WebhookMessage:
if flag == settings.APRIL_FLAG_1:
guild_role = ctx.guild.get_role(settings.roles.APRIL_ROLE_1)
await ctx.user.add_roles(guild_role)
return ctx.respond("Ahoy, you found it! Perhaps another is lurking", ephemeral=True)
if flag == settings.APRIL_FLAG_2:
guild_role = ctx.guild.get_role(settings.roles.APRIL_ROLE_2)
await ctx.user.add_roles(guild_role)
return ctx.respond("You have completed your quest.", ephemeral=True)
return ctx.respond("That is not right.", ephemeral=True)


def setup(bot: Bot) -> None:
"""Load the `Fun` cog."""
Expand Down
5 changes: 0 additions & 5 deletions src/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ class Roles(BaseSettings):
BUDDY_GANG: int
RED_TEAM: int
BLUE_TEAM: int
APRIL_ROLE_1: int
APRIL_ROLE_2: int
@validator("*", pre=True, each_item=True)
def check_length(cls, value: str | int) -> str | int:
value_str = str(value)
Expand All @@ -165,9 +163,6 @@ class Global(BaseSettings):
database: Database = None
channels: Channels = None
roles: Roles = None

APRIL_FLAG_1: str
APRIL_FLAG_2: str
HTB_API_KEY: str

# Collections are defined using lowercase
Expand Down