Discord.js与TypeScript – 发布多个指令

huangapple go评论77阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年3月4日 02:56:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/75630889.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定