Skip to content
Advertisement self-bot replies only to itself

async def on_message(message):
    channel = bot.get_channel(931570478915657790)
    if message.content == "hello":
        await channel.send("hi!")

I’m new at programming. I want to write a bot for my Discord channel to send users “hi” messages who send “hello”. But there is a problem, only I (the self bot) can receive the “hi!” message. When I write “hello” from another account, the bot doesn’t answer it. Note: I am using a self-bot, not a normal bot.


Answer does not support selfbots very well, instead run these commands:

pip uninstall
pip install is a copy of which gives more functionality to selfbots. However, selfbots are technically against the discord terms of service, so use at your own risk. Your code should work the exact same.