From 70328291e16345dfde48e855fc6f48a2cd1cb0df Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Mar 2023 01:10:31 +0100 Subject: [PATCH] Trying to automatically add Trial role --- recruitmentCog/recruitment.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recruitmentCog/recruitment.py b/recruitmentCog/recruitment.py index 59b923f..4d395eb 100644 --- a/recruitmentCog/recruitment.py +++ b/recruitmentCog/recruitment.py @@ -52,6 +52,11 @@ class Recruitment(commands.Cog): # Send a confirmation message to the author await author.send("Thank you for submitting your application!") + # Assign the role to the author + guild = self.bot.get_guild(application_channel.guild.id) + role = guild.get_role(531181363420987423) + await author.add_roles(role) + async def format_application(self, answers: List[str], author: discord.Member) -> discord.Embed: """Format the application answers into an embed.""" embed = discord.Embed(title=f"Application from {author.display_name}", color=discord.Color.green()) @@ -60,12 +65,6 @@ class Recruitment(commands.Cog): embed.add_field(name="Discord ID", value=author.id) embed.add_field(name="Age", value=answers[1]) embed.add_field(name="Reason wishing to become a member:", value=answers[2]) - - guilds = [f"{guild.name} ({guild.id})" for guild in author.guilds] - if guilds: - embed.add_field(name="Server Membership", value="\n".join(guilds)) - - embed.add_field(name="Status", value=author.status.name) return embed