我的机器人使用 Discord.py 自动对新消息做出反应,并在 25 颗星后将它们添加到右舷。但是,在运行一段时间后会出现此错误:忽略 on_raw_reaction_add 中的异常
Ignoring exception in on_raw_reaction_add
Traceback (most recent call last):
File "C:\Users\timpi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 312, in _run_event
await coro(*args, **kwargs)
File ".\main.py", line 36, in on_raw_reaction_add
message = await reactchannel.fetch_message(payload.message_id)
File "C:\Users\timpi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\abc.py", line 935, in fetch_message
data = await self._state.http.get_message(channel.id, id)
File "C:\Users\timpi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\http.py", line 223, in request
raise NotFound(r, data)
discord.errors.NotFound: 404 Not Found (error code: 10008): Unknown Message
这是on_raw_reaction_add事件:
@bot.event
async def on_raw_reaction_add(payload):
channel_id = int(config["channelIDMemephone"])
reactchannel = bot.get_channel(channel_id)
message = await reactchannel.fetch_message(payload.message_id)
await star_post_check(message)
慕仙森
相关分类