Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVEMENT] Update verify command #110

Merged
Merged
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
17 changes: 11 additions & 6 deletions src/cmds/core/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from src.bot import Bot
from src.core import settings
from src.helpers.verification import process_certification

logger = logging.getLogger(__name__)


Expand All @@ -24,6 +25,7 @@ def __init__(self, bot: Bot):
)
@cooldown(1, 60, commands.BucketType.user)
async def verifycertification(self, ctx: ApplicationContext, certid: str, fullname: str) -> Interaction | WebhookMessage:
"""Verify users their HTB Certification."""
if not certid or not fullname:
await ctx.respond("You must supply a cert id!", ephemeral=True)
return
Expand All @@ -37,6 +39,7 @@ async def verifycertification(self, ctx: ApplicationContext, certid: str, fullna
await ctx.respond(f"Added {cert}!", ephemeral=True)
else:
await ctx.respond("Unable to find certification with provided details", ephemeral=True)

@slash_command(
guild_ids=settings.guild_ids,
description="Receive instructions in a DM on how to identify yourself with your HTB account."
Expand All @@ -50,8 +53,9 @@ async def verify(self, ctx: ApplicationContext) -> Interaction | WebhookMessage:
embed_step1 = discord.Embed(color=0x9ACC14)
embed_step1.add_field(
name="Step 1: Log in at Hack The Box",
value="Log in to your Hack The Box account at <https://www.hackthebox.com/> and navigate to the settings "
"page.", inline=False, )
value="Go to the Hack The Box website at <https://www.hackthebox.com/>"
" and navigate to **Login > HTB Labs**. Log in to your HTB Account."
, inline=False, )
embed_step1.set_image(
url="https://media.discordapp.net/attachments/724587782755844098/839871275627315250/unknown.png"
)
Expand All @@ -60,8 +64,9 @@ async def verify(self, ctx: ApplicationContext) -> Interaction | WebhookMessage:
embed_step2 = discord.Embed(color=0x9ACC14)
embed_step2.add_field(
name="Step 2: Locate the Account Identifier",
value='In the settings tab, look for a field called "Account Identifier". Next, click the green button to '
"copy your secret identifier.", inline=False, )
value='Click on your profile name, then select **My Profile**. '
'In the Profile Settings tab, find the field labeled **Account Identifier**. (<https://app.hackthebox.com/profile/settings>) '
"Click the green button to copy your secret identifier.", inline=False, )
embed_step2.set_image(
url="https://media.discordapp.net/attachments/724587782755844098/839871332963188766/unknown.png"
)
Expand All @@ -70,8 +75,8 @@ async def verify(self, ctx: ApplicationContext) -> Interaction | WebhookMessage:
embed_step3 = discord.Embed(color=0x9ACC14)
embed_step3.add_field(
name="Step 3: Identification",
value="Now type `/identify IDENTIFIER_HERE` in the bot-commands channel.\n\nYour roles will then be "
"automatically applied.", inline=False
value="Now type `/identify IDENTIFIER_HERE` in the bot-commands channel.\n\nYour roles will be "
"applied automatically.", inline=False
)
embed_step3.set_image(
url="https://media.discordapp.net/attachments/709907130102317093/904744444539076618/unknown.png"
Expand Down