【发布时间】:2021-09-08 09:17:23
【问题描述】:
我想知道我是否可以通过 ID(一般、公告、赠品等)一次向更多频道发送消息
这是我现在的错误,但我无法弄清楚为什么不起作用。
ERROR: Ignoring exception in on_ready
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 17, in on_ready
member = await bot.fetch_user(i)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 1384, in fetch_user
data = await self.http.get_user(user_id)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py", line 250, in request
raise NotFound(r, data)
discord.errors.NotFound: 404 Not Found (error code: 10013): Unknown User
代码是in the pastebin:
【问题讨论】:
-
请将代码中的代码放在 codebloc 中,而不是在 pastebin 上。 Here's how to do it.
-
我给了你一个应该有效的答案,检查一下。如果出了什么问题,请在 cmets 中询问我。
-
@Kyrela 我可以将代码放在代码块中,因为它给了我一个格式不正确的错误。
-
@FLAK-ZOSO 如果我想通过 id 对一些用户进行 dm,我可以这样做吗?
-
@seek,我已经回答了你的问题。如果它有效,你可以接受它。
标签: python python-3.x discord discord.py