Python中文
首页
教程
问答
标签
搜索
登录
注册
discord.py discord.errors.Forbidden:403禁止(错误代码:50013):缺少权限错误
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>当一些用户做出反应时,我会给他们一个角色,但上面说</p> <pre><code>discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions </code></pre> <p>并且bot具有管理员权限</p> <p>这是我的密码:</p> <pre><code>@bot.event async def on_raw_reaction_add(payload): emoji = payload.emoji.name canal = payload.channel_id message = payload.message_id python_role = get(bot.get_guild(payload.guild_id).roles, name="python") member = bot.get_guild(payload.guild_id).get_member(payload.user_id) if canal == 703637575566491731 and message == 703643218658459778 and emoji == "python": await membre.add_roles(python_role) </code></pre> <p>错误代码:</p> <pre><code> Ignoring exception in on_raw_reaction_add Traceback (most recent call last): File "C:\Users\natael\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 312, in _run_event await coro(*args, **kwargs) File "C:/Users/natael/PycharmProjects/tp's/bot discord/main.py", line 30, in on_raw_reaction_add await membre.add_roles(python_role) File "C:\Users\natael\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\member.py", line 641, in add_roles await req(guild_id, user_id, role.id, reason=reason) File "C:\Users\natael\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\http.py", line 221, in request raise Forbidden(r, data) discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions </code></pre>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>bot的角色必须高于指定给用户的角色</p> <p>还有一个拼写错误:<code>await membre.add_roles(python_role)</code> membr/成员</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
文本导入时标题行中的特殊字符
8 回答
文本小部件:在没有输入时更新并在循环后保持空闲
2 回答
文本小部件tkin
9 回答
文本小部件tkinter中的标签更改或文本外观更改是否有撤消功能?
1 回答
文本小部件tkinter复制图像选项
3 回答
文本小部件上的Python Tkinter ttk滚动条未缩放
8 回答
文本小部件上的滚动条可能需要根据制表符ord显示前进行滚动
7 回答
文本小部件不显示lis中的内容
8 回答
文本小部件不显示Unicode字符
10 回答
文本小部件中写入的行间距
6 回答
文本小部件中的文本作为变量
7 回答
文本小部件中的滚动条仅显示在底部
2 回答
文本小部件中的选项卡键空间计数
4 回答
文本小部件作为Lis
3 回答
文本小部件在主框架中扩展列宽
8 回答
文本小部件未使用删除功能清除
5 回答
文本小部件滚动动画(Tkinter、Python)
8 回答
文本居中。格式正确吗?
5 回答
文本差分算法
8 回答
文本已知时音频文件中的单词索引
2 回答