B
B
BrenLike2020-08-10 14:16:53
Python
BrenLike, 2020-08-10 14:16:53

After writing a message, the bot starts spamming, discord.py - on_message?

After writing any message, the bot starts spamming.
I need the bot to send one message without spam

@client.event
async def on_message(message):
    channel = message.channel
    isBot = message.author.bot

    await channel.send("Message")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Rosin, 2020-08-10
@BrenLike

@client.event
async def on_message(message):
    channel = message.channel
    isBot = message.author.bot
    
    if(message.author.bot) return

    await channel.send("Message")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question