Johan Madrid
Johan Madrid

Reputation: 26

Discord Bot isn't responding to command

My discord bot is not responding to "test". There are no error messages, so I am very confused why this is happening.

I just started Python today and I wanted to learn how to make a Discord bot

    import discord

    client = discord.Client(intents = discord.Intents.default())

    @client.event
    async def on_ready():
        general_channel = client.get_channel(1045161050024185899)

        await general_channel.send('Bot Activated By-**GotYoHat** \nMade By **GotYoHat** using **Python**')

    @client.event
    async def on_message(message):
        if message.content == 'test':
            await message.channel.send('work')

    client.run('the token is right here')

I searched the internet for an answer and I can't find a single answer online

Upvotes: 1

Views: 71

Answers (1)

You need to turn on intents. Try to discord.Intents.all()

Upvotes: 1

Related Questions