Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @interactions.extension_listener
- async def on_guild_member_add(self, member: interactions.Member):
- now = datetime.datetime.now()
- client = self.client
- memberGuildId = member.guild_id
- subcribeDevelopment = await interactions.get(client, interactions.Role, object_id=890470382052712448, parent_id=self.serverId)
- subcribeEvents = await interactions.get(client, interactions.Role, object_id=890470398192402493, parent_id=self.serverId)
- # verification
- await verifHandler.updateInDepartmentGroup(self.client, ctx.author.id)
- await verifHandler.updateInMainGroup(self.client, ctx.author.id)
- await verifHandler.changeNickname(self.client, ctx.author)
- # add there roles
- await member.add_role(subcribeDevelopment)
- await member.add_role(subcribeEvents)
- # welcome channel
- e = interactions.Channel(** await client._http.get_channel(self.finestChannel), _client=client._http)
- msg = await e.send(f"{member.mention} just joined the server.")
- await msg.create_reaction("👋")
- # welcome dm message
- embed = interactions.Embed(title = f"LawMixer's SCP:F", description = f"Thank you for joining, {member.mention}.", color=0xe79f04)
- embed.add_field(name="You will need to verify with RoVer to gain access to our channels, ", value = "<#977296387832168518>", inline=False)
- embed.add_field(name = "You have been subscribed to notifications by default", value="You can disable them by doing /subscribe in commands.")
- embed.set_thumbnail(url=member.user.avatar_url)
- embed.set_footer(text = f"Sent by: LawMixer's SCP:F | Discord ID: {member.id}")
- button = interactions.Button(label="Roblox Group", style= interactions.ButtonStyle.LINK, url=f"https://www.roblox.com/groups/4800717/SCP-F-Special-Containment-Procedures-Foundation#!/about")
- button2 = interactions.Button(label="Application Center", style= interactions.ButtonStyle.LINK, url="https://www.roblox.com/games/7944405760/Application-Center-In-Testing")
- button3 = interactions.Button(label="Discord Server", style= interactions.ButtonStyle.LINK, url="https://discord.gg/X33juJwjS6")
- try:
- await member.send(embeds = embed, components=[button, button2, button3])
- except interactions.LibraryException:
- print("cannot dm user")
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement