doesn't run discord bot

Heres the code:

import os
from discord.ext import commands
import discord
intents = discord.Intents.default()
intents.message_content = True #v2

client = commands.Bot(command_prefix=‘!’, intents=intents)

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

async def on_message(message):
await client.process_commands(message)

async def hello(ctx):
await’Hello {}')

my_secret = os.environ[‘T’]
token = my_secret #The error starts here

I have no idea whats going on and how to fix it.

Where you have (token) is there an actual token there, or do you have it saved in secrets with the name token?

Also, have you set up the bot in the Discord Developer Portal?

Yes and I have set up the developer portal it goes online if I remove the “intents.message_content = True” but then the messages won’t work for some reason.

Here is the error that is ruining the commands: “ Privileged message content intent is missing, commands may not work as expected.”

Nvm I fixed it I had to replace something