Skip to content

Commit

Permalink
prompt user for gh account
Browse files Browse the repository at this point in the history
  • Loading branch information
SonOfLope committed Oct 18, 2024
1 parent 51568ba commit 3236433
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cogs/requests/join.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime
from discord import Embed, Color
from cogs.utils.dispatch import post_to_calidum
from cogs.prompts import prompt_user_with_select, prompt_user
from cogs.prompts import prompt_user_with_select, prompt_user, prompt_user_with_confirmation
from cogs.utils.discord import find_role_in_guild
from logger import logger
from cogs.utils.text_format import make_mention, generate_mention_dict
Expand Down Expand Up @@ -39,7 +39,15 @@ async def request_server_access(ctx):

if role.id == member_role:

await ctx.respond("Pour devenir membre, veuillez fournir votre nom d'utilisateur GitHub et votre adresse e-mail. Vérifier vos messages privés pour plus d'informations.", ephemeral=True)
await ctx.respond("Afin de compléter votre demande d'adhésion, veuillez vérifier vos messages privés.", ephemeral=True)

user_has_gh_account = await prompt_user_with_confirmation(ctx, "Avez-vous un compte GitHub ?")

if not user_has_gh_account:
# Give user link to our wiki track to learn git and github and then return to the command to try again
await ctx.author.send("Vous pouvez apprendre à utiliser Git et GitHub en suivant ce lien : https://wiki.omni.cedille.club/onboarding/tracks/git/ \n\nUne fois que vous avez un compte GitHub, veuillez réessayer la commande `/request join`.")
return

github_username = await prompt_user(ctx, "Veuillez entrer votre nom d'utilisateur GitHub", "Nom d'utilisateur GitHub pour devenir membre")
if not github_username:
return
Expand Down

0 comments on commit 3236433

Please sign in to comment.