somehow my bot is not responding to commands in servers, but he is responding in DM. Someone can help me?
My code:
import discord
from dotenv import load_dotenv
token = "****"
load_dotenv()
client = discord.Client(intents=discord.Intents.default() )
@client.event
async def on_ready():
print(f"Bot logged in as {client.user}")
@client.event
async def on_message(message):
if message.author != client.user:
if message.content =='$hi':
d = "hi"
await message.channel.send(d)
client.run(token)