I have a Discord bot and a webhook setup for a Discord channel to send a command every hour on the dot. However it seems that Discord Rewrite by default ignores commands sent from other bots. How do I go about disabling this?
Do I need to modify something on a per-command function or the on_message
function?
Current on_message
:
@bot.event
async def on_message(message):
await bot.process_commands(message)
When running a big discord server, not one bot can do all asks.
on Jun 1, 2020. No problem! You can place the let replies = ["reply 1", "reply 2", "reply 3"]; at the top of your file (e.g. where you require discord.io ) and you can put the entire bot. sendMessage function whenever and wherever you need to send one of those random replies!
Yes, the action of one bot can trigger another: for example, one bot can modify a row and then trigger another bot. NOTE: bots will cut short and show an error if there are too many recursive bot executions or cyclical execution loops, to avoid overloading the system.
At the moment, the only way to restrict bots to one channel only is to manually remove the bot's chat permissions in each channel that you don't want it in. The more channels you have in a server, the more tedious it becomes.
Try adding a check for it:
on_message:
if message.author.bot == True:
#Do something
command:
if ctx.author.bot == True:
#Do something
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With