你如何为你的不和谐机器人创建一个永久的 oauth 邀请?

时间:2021-07-02 00:15:27

标签: javascript html oauth discord

我为我的不和谐机器人设置了一个网页,我为我的机器人创建了一个邀请按钮,其中包含 oauth 链接。但是,它只能工作一次并说“没有提供范围”。 enter image description here

这是我的 oauth 链接 url

1 个答案:

答案 0 :(得分:0)

要为您的 Discord bot 创建 OAuth2 URL,我建议使用 this guide,但这里有一个基本的概要。

  1. 确保您创建了一个机器人并将其链接到应用程序

Discord Developer "Bot" Page, with "Add Bot" button highlighted.

  1. 从侧边栏中选择 OAuth2

Discord Developer Sidebar, with "OAuth2" option highlighted.

  1. 向下滚动到“OAuth2 URL Generator”部分,并启用 bot 范围。 (不要担心添加重定向 URL,您不需要它。)

Discord OAuth2 URL Generator Scopes Panel, with the "Bot" option highlighted.

  1. 再次向下滚动,然后为您的机器人选择所需的权限。

Discord OAuth2 Bot Permissions Panel, with "Administrator" Enabled.

  1. 点击“复制”按钮复制您的邀请网址

Discord OAuth2 URL Generator Scopes Panel, with the "Copy" button highlighted.

此 URL 不会过期,这意味着只要应用程序(和机器人)仍然存在,它就会有效。

话虽如此,here's a fixed version of your OAuth URL