From 35816e4d6103c29ed056f322234c6bbc5dc3dfaa Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Mar 2023 01:21:02 +0100 Subject: [PATCH] Fuck more debugging! --- recruitmentCog/recruitment.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/recruitmentCog/recruitment.py b/recruitmentCog/recruitment.py index 8f94939..32ba007 100644 --- a/recruitmentCog/recruitment.py +++ b/recruitmentCog/recruitment.py @@ -50,13 +50,16 @@ class Recruitment(commands.Cog): for reaction in reactions: await message.add_reaction(reaction) - # Send a confirmation message to the author - await author.send("Thank you for submitting your application!") + # Check if the author is a member of the guild + guild = self.bot.get_guild(274657393936302080) + member = guild.get_member(author.id) + if member is None: + await author.send("You need to join the server before your application can be processed.") + return - # Add "Trial" role to the author - guild = self.bot.get_guild(guild_id) + # Assign the Trial role to the author role = guild.get_role(531181363420987423) - await author.add_roles(role) + await member.add_roles(role) async def format_application(self, answers: List[str], author: discord.Member) -> discord.Embed: """Format the application answers into an embed."""