问题描述
当我运行下面的 python 代码时,它不会接收来自其他机器人的消息:
When I run the python code below, it doesn't pick up messages from other bots:
@bot.event async def on_message(message): print(message)
有什么方法可以让我的 discord.py 机器人接收来自其他机器人的消息?
Is there any way to make so that my discord.py bot does pick up messages from other bots?
推荐答案
我决定只使用 channel.history(limit=10).flatten() 和 channel.fetch_message(ID) 函数并将它们放在一个循环中,这也适用于我的应用程序.
I decided to just use the channel.history(limit=10).flatten() and channel.fetch_message(ID) functions and put them in a loop, which also works well for my application.