Discord-如何授予我的漫游器权限.[Javascript] [英] Discord - How to give my bot permissions. [Javascript]

查看:64
本文介绍了Discord-如何授予我的漫游器权限.[Javascript]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始尝试需要我的机器人具有某些权限的东西.我不知道如何通过JS实际分配这些权限.有人有什么想法吗?(我还听说,许可权还会为漫游器设置自定义角色)

I started to experiment with things that required my bot to have certain permissions. I didn't know how to actually assign these permissions through JS. Does anyone have any ideas? (I also heard the permissions would also make a custom role for the bot)

谢谢.

推荐答案

您不能向公会中的机器人分配权限.必须通过邀请它的人的邀请范围将它们自动授予该机器人.

You cannot assign permissions to a bot in the guild. They must be willingly given to the bot through the invite scopes of the person who invited it.

是的,权限将赋予bot在服务器中的角色,因此它可以定义您是否可以对具有较高角色的用户执行某些操作.

And yes, the permissions will give the bot a role in the server, so it can define if you can do something to a user with a higher role.

如果您已经在服务器上安装了bot,但我假设您已经执行了这些操作,但是没有解释.

Im assuming you did these if you already have your bot on a server, but ill explain.

您转到OAuth2 URL生成器,然后输入您的客户端ID(希望您已经知道如何获取它.)然后选择bot作用域(以及您想要的任何其他作用域...),然后向下滚动进入权限"部分,然后选择您的漫游器所需的权限.用户有权删除这些权限,然后您实际上不能做任何事情,希望他们知道如果没有它,机器人将无法执行该命令.

You go to the OAuth2 URL Generator, and put your client ID (I hope you already know how to get that.) You then select the bot scope(and any other scopes you would like...), then scroll down to the permissions section, and select the permission your bot needs. The user has the right to remove these permission, and then you can't really do anything, and hope they know the bot cant do the command then without it.

然后将链接复制回应用信息"区域,以便您可以将其粘贴并在服务器上安装机器人!

Then copy the link back up in the Appliction Info area, so you can paste it, and get your bot on a server!

那真是很多,希望对您有帮助.

That was alot, hope this helps at all.

这篇关于Discord-如何授予我的漫游器权限.[Javascript]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆