英文:
Discord.js with typescript - post multiple commands
问题
以下是您要翻译的内容:
I have a problem refreshing the slashcommands in typescript. I can only pass an array of one command object as body to the Discord API. Whenever I do more, I am getting a "Invalid Form Body".
The json:
[{ "name": "ping", "description": "Replies with Pong!" },{ "name": "userCount", "description": "Returns the number of users online." }]
英文:
I have a problem refreshing the slashcommands in typescript. I can only pass an array of one command object as body to the Discord API. Whenever I do more, I am getting a "Invalid Form Body".
The json:
[{"name":"ping","description":"Replies with Pong!"},{"name":"userCount","description":"Returns the number of users online."}]
答案1
得分: 2
每个命令都必须以小写字母命名。
英文:
Every command has to be named in lowercase.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论