Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Welcome(commands.Cog):
- def __init__(self, bot):
- self.bot = bot
- @commands.Cog.listener()
- async def on_member_join(self, user: discord.Member):
- guildName = user.guild.name
- channel = self.bot.get_channel(555844758778544160)
- embed = discord.Embed(colour=discord.Color(random.randint(0x000000, 0xFFFFFF)))
- embed.title = "Hello {}, welcome to {}!".format(user, guildName)
- embed.description = "Before you continue we just want to make sure you have read up on our all important group guidelines. if you haven't you can find them in <#546694486391128066>. Once you're satified with them go ahead and give my message a :thumbsup:."
- embed.set_image(url='')
- msg = await channel.send(embed=embed)
- await msg.add_reaction(thumbs_up) # todo: make bot set a thumbs_up emoji but only set members role when the user mentioned reacts.
- await self.bot.wait_for('reaction_add', check=react_check(user, msg, thumbs_up))
- role = get(user.guild.roles, name="Members")
- if self.bot: #supposed check to see if the bot
- pass
- else:
- await user.add_roles(role)
- await channel.send(':thumbsup: Awesome! you're now set to go. If you would like to add some roles head over to <#555913791615926302> for more details. ')# Check
- def setup(bot):
- bot.add_cog(Welcome(bot))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement