Discord.py bot unable to mention all server members - Python implementation issue

I’m having trouble getting my Python Discord bot to properly mention everyone in the server. When I try to send a message that should notify all members, it just shows up as plain text instead of actually pinging them.

Here’s what I’ve been working with:

@bot.command()
async def notify_all(message):
    await message.send("@everyone")

This code runs without errors but the @everyone just appears as regular text and doesn’t actually ping anyone. I’m pretty new to Discord bot development and Python in general, so I’m probably missing something obvious. Has anyone dealt with this before? What am I doing wrong here?

Discord automatically suppresses mentions in bot messages. Even with the right syntax and permissions, @everyone might show as plain text based on your server settings.

I hit this same issue last year. You need to explicitly allow mentions in your message:

@bot.command()
async def notify_all(ctx):
    await ctx.send("@everyone", allowed_mentions=discord.AllowedMentions(everyone=True))

The allowed_mentions parameter tells Discord you actually want to ping everyone. Without it, Discord blocks the mention for security. Also check that your bot has “Mention Everyone” permission in the server role settings.

check your bot’s permissions in the server settings - it needs ‘mention everyone’ enabled or the code won’t work. also, try using @bot.command() with ctx instead of message. it should look like async def notify_all(ctx):

Your function parameter’s wrong. You’re using message but discord.py commands need ctx (context). Here’s the fix:

@bot.command()
async def notify_all(ctx):
    await ctx.send("@everyone")

I hit this same issue when I started with discord.py. The message parameter doesn’t have a send() method - that’s why your bot isn’t responding. Also check that your bot has “Mention Everyone” permission in your server’s role settings, or Discord will block the mention even with correct code.