1)在https://discord.com/developers/applications, 创建机器人 2)点击Oauth2页面,点击bot,Administator 虽然不安全,但过了Demo期自己在线上环境自己再换 2.2)复制"GENERATED URL"到浏览器中访问,授权到你有权限管理的群组。 https://discord.com/api/oauth2/authorize?client_id=[xxx]&permissions=8&scope=bot 3...
通过bot - Discord.js获取通道ID,可以使用Discord.js提供的API来实现。 首先,你需要安装Discord.js库,可以使用npm命令进行安装: 代码语言:txt 复制 npm install discord.js 然后,在你的代码中引入Discord.js库: 代码语言:txt 复制 const Discord = require('discord.js'); ...
Now, look for the OAuth2 option in the menu on the left sidebar and click on it to find your CLIENT ID. It's a long string of numbers that you need to copy and paste to this URL below -- replace the word CLIENTID with the actual CLIENT ID that you just copied -https://discord...
为Discord Bot 的 API分配一个开发账户:①首先在Autocode中,点击Link New Resource,点击Discord Developer Portal跳转到DC开发者门户网站;②接着点击New Application 建立Discord Bot 的 API,并给bot命名,比如我输入chatgpt,勾选复选框,点击Creat创建;③然后点击oAuth2,复制Client ID和Client Secret填入到对应的框中,...
Bot in Discord with discord.js (3) Chapter 4 - 对 Chapter 2 代码的解释 我们在系列文章(1) 中,完成了简单的机器人的建立与交互。 下面,我们开始针对 discord.js V14.0.3 的特性和方法,通过 Discord 机器人的编写实践,来掌握 discord.js 的使用。
我试图创建一个断开用户连接的命令,但是我不明白为什么它会给我这个错误:'Client‘对象没有' command’属性(这只是bot代码的一部分) @client.command awaitdiscord.Member.disconnect() if msg.startswith("$kick 浏览11提问于2020-03-29得票数 0 1回答 ...
The bot should now be running and ready to use in your self-hosted environment Invite the Bot: Construct the invite URL using the following format: https://discord.com/oauth2/authorize?client_id=YOUR_DISCORD_APPLICATION_ID&scope=bot&permissions=275146345536 Support and Feedback For any issues...
Bot(command_prefix='!') # Startup Information @client.event async def on_ready(): print('Connected to bot: {}'.format(client.user.name)) print('Bot ID: {}'.format(client.user.id)) @client.command() async def go(ctx): # USAGE: use command !go in the comment box when uploading...
Discord bot for DMOJ discord.com/api/oauth2/authorize?client_id=725004198466551880&permissions=73792&scope=bot 6stars9forksBranchesTagsActivity Star Notifications master 7Branches0Tags Code Folders and files Latest commit 4546b9b·Apr 18, 2023
Authorization: `Bot ${token}` } }) if (!response.ok) throw new Error(`Error status code: ${response.status}`) return JSON.parse(await response.json()) } 响应将是这样的:{ "id": "123456789012345678", "username": "some username", ...