Shunshun94 / discord-bcdicebot

BCDice bot for Discord
GNU General Public License v3.0
20 stars 16 forks source link

オリジナル表をサジェストするようにする #142

Closed Shunshun94 closed 2 years ago

Shunshun94 commented 2 years ago
Exception in thread "main" java.util.concurrent.CompletionException: org.javacord.api.exception.BadRequestException: Received a 400 response from Discord with body {"code": 50035, "errors": {"options": {"4": {"options": {"_errors": [{"code": "BASE_TYPE_MAX_LENGTH", "message": "Must be 25 or fewer in length."}]}}}}, "message": "Invalid Form Body"}!
        at java.base/java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412)
        at java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2044)
        at com.hiyoko.discord.bot.BCDice.Listener.SlashInputMessageCreateListener.defineSlashCommand(SlashInputMessageCreateListener.java:155)
        at com.hiyoko.discord.bot.BCDice.Listener.SlashInputMessageCreateListener.<init>(SlashInputMessageCreateListener.java:81)
        at com.hiyoko.discord.bot.BCDice.BCDiceBot.<init>(BCDiceBot.java:103)
        at com.hiyoko.discord.bot.BCDice.BCDiceBot.main(BCDiceBot.java:145)
Caused by: org.javacord.api.exception.BadRequestException: Received a 400 response from Discord with body {"code": 50035, "errors": {"options": {"4": {"options": {"_errors": [{"code": "BASE_TYPE_MAX_LENGTH", "message": "Must be 25 or fewer in length."}]}}}}, "message": "Invalid Form Body"}!
        at org.javacord.core.util.rest.RestRequestHttpResponseCode.lambda$getDiscordException$2(RestRequestHttpResponseCode.java:224)
        at java.base/java.util.Optional.map(Optional.java:265)
        at org.javacord.core.util.rest.RestRequestHttpResponseCode.getDiscordException(RestRequestHttpResponseCode.java:224)
        at org.javacord.core.util.rest.RestRequest.lambda$executeBlocking$11(RestRequest.java:417)
        at java.base/java.util.Optional.flatMap(Optional.java:294)
        at org.javacord.core.util.rest.RestRequest.executeBlocking(RestRequest.java:416)
        at org.javacord.core.util.ratelimit.RatelimitManager.lambda$queueRequest$2(RatelimitManager.java:114)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.Exception: origin of RestRequest call
        at org.javacord.core.util.rest.RestRequest.<init>(RestRequest.java:79)
        at org.javacord.core.interaction.ApplicationCommandBuilderDelegateImpl.createGlobal(ApplicationCommandBuilderDelegateImpl.java:74)
        at org.javacord.api.interaction.ApplicationCommandBuilder.createGlobal(ApplicationCommandBuilder.java:144)
        at com.hiyoko.discord.bot.BCDice.Listener.SlashInputMessageCreateListener.defineSlashCommand(SlashInputMessageCreateListener.java:155)
        at com.hiyoko.discord.bot.BCDice.Listener.SlashInputMessageCreateListener.<init>(SlashInputMessageCreateListener.java:81)
        at com.hiyoko.discord.bot.BCDice.BCDiceBot.<init>(BCDiceBot.java:103)
        at com.hiyoko.discord.bot.BCDice.BCDiceBot.main(BCDiceBot.java:145)
{
  "code": 50035,
  "errors": {
    "options": {
      "4": {
        "options": {
          "_errors": [
            {
              "code": "BASE_TYPE_MAX_LENGTH",
              "message": "Must be 25 or fewer in length."
            }
          ]
        }
      }
    }
  },
  "message": "Invalid Form Body"
}

まじかぁ

Shunshun94 commented 2 years ago

https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-structure

Parameters for the command, max of 25

まじだぁ

Shunshun94 commented 2 years ago

/brt のみとし、登録時に25件を超えるようなら list 機能のみの提供とするとか……