Add Role by Text Trigger -

I have asked in a lot of places, but I have yet no answer still.

Me and my friend want to make a bot that if a user says “I love baguettes”, they get the baguette team role. I keep getting “role not found” error even though the id is correct. Please help.

Here is the code:

import os, re, discord
from discord.ext import commands
from discord.utils import get


client = commands.Bot(command_prefix="!", intents= discord.Intents.all())

async def on_ready():
    print(f'We have logged in as {client.user}')

async def on_message(message):
    print("message was: " + message.content)
    if == client.user:

    if message.content == 'I love baguettes':
        member =
        role = discord.utils.get(message.guild.roles, id="1085983212855115887")
        await member.add_roles(role)
        #discord.utils.get(message.guild.roles, id=1085983212855115887)
        #discord.utils.get(message.guild.roles, id="1085983212855115887")
        await'So do I! In fact, I have given you the Baguette Team role!')

What else does it say?

How do you know?

Because I copied the ID numerous times.

Also I found my answer on Stack Overflow today.