CICUS
CICUS

Reputation: 15

discord bot Welcome message dont work .py

class Welcome (commands.Cog, name="join"):

    def __init__(self, bot):
        self.bot = bot

    @commands.Cog.listener()
    async def on_member_join(self, member: discord.Member):
        role = discord.utils.get(member.guild.roles, name='Server Tag')
        channel = self.bot.get_channel(801949269165998080)
        embed = discord.Embed(description=f'Hi {member.mention}, Welcome to the server', color=0x0bf9f9)
        await member.add_roles(role)
        await channel.send(embed=embed)

When a member join on to the server, the bot does not respond with a message. What could be the problem`?

Upvotes: 1

Views: 1005

Answers (1)

FakeBlob
FakeBlob

Reputation: 60

The problem may be you don't have intents enabled, you can enable intents on the bot, based on what you need here.

You do need to do a bit of coding to enable intents but I find it easy.

The two toggled switches are intents.

This is how easy it could be.

This is what I needed to code, in order for my intents to work. ^^^

Upvotes: 0

Related Questions