lilserf / bot-on-the-clocktower

Bot to assist with playing Blood on the Clocktower via Discord
MIT License
22 stars 4 forks source link

Can't run /createtown - Bad request: 400 : Invalid Form Body #174

Closed CharliW90 closed 10 months ago

CharliW90 commented 10 months ago

Tried three times - errors as follows:

Queue Request [Guild: 1192568242275889264] Exception: BadRequestException Message: Bad request: 400 : Invalid Form Body Stack trace: at Bot.DSharp.ExceptionWrap.WrapExceptionsAsync[T](Func`1 f) in /home/runner/work/bot-on-the-clocktower/bot-on-the-clocktower/Bot.DSharp/ExceptionWrap.cs:line 40 at Bot.Core.Interaction.BaseInteractionQueue`1.QueueInteractionAsync(String initialMessage, IBotInteractionContext context, Func`1 queuedTask) in /home/runner/work/bot-on-the-clocktower/bot-on-the-clocktower/Bot.Core/Interaction/BaseInteractionQueue.cs:line 60

Queue Request [Guild: 1192568242275889264] Exception: BadRequestException Message: Bad request: 400 : Invalid Form Body Stack trace: at Bot.DSharp.ExceptionWrap.WrapExceptionsAsync[T](Func`1 f) in /home/runner/work/bot-on-the-clocktower/bot-on-the-clocktower/Bot.DSharp/ExceptionWrap.cs:line 40 at Bot.Core.Interaction.BaseInteractionQueue`1.QueueInteractionAsync(String initialMessage, IBotInteractionContext context, Func`1 queuedTask) in /home/runner/work/bot-on-the-clocktower/bot-on-the-clocktower/Bot.Core/Interaction/BaseInteractionQueue.cs:line 60

Queue Request [Guild: 1192568242275889264] Exception: BadRequestException Message: Bad request: 400 : Invalid Form Body Stack trace: at Bot.DSharp.ExceptionWrap.WrapExceptionsAsync[T](Func`1 f) in /home/runner/work/bot-on-the-clocktower/bot-on-the-clocktower/Bot.DSharp/ExceptionWrap.cs:line 40 at Bot.Core.Interaction.BaseInteractionQueue`1.QueueInteractionAsync(String initialMessage, IBotInteractionContext context, Func`1 queuedTask) in /home/runner/work/bot-on-the-clocktower/bot-on-the-clocktower/Bot.Core/Interaction/BaseInteractionQueue.cs:line 60

Either I don't understand the 'setup' for this bot, or it simply isn't working

lilserf commented 10 months ago

Sounds like something is busted, not that you're doing anything wrong. I'll try to find some time to take a look.

lilserf commented 10 months ago

I'm able to reproduce this locally but I haven't had time to dig any further. Probably something changed about Discord's API, I'm guessing.

thislooksfun commented 10 months ago

This is happening for me when I run /game as well.

lilserf commented 10 months ago

Hmm the error message here is

{
  "allowed_mentions": {
    "_errors": [
      {
        "code": "MODEL_TYPE_CONVERT",
        "message": "Expected an object/dictionary."
      }
    ]
  }
}
lilserf commented 10 months ago

I've deployed a new version that seems to fix this issue! Still have no idea why it suddenly started happening.