-
Hi. Have this code:
And i have error:
When i dont use ->acknowledgeWithResponse() and use $interaction->respondWithMessage() - all is OK. Why so ? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Invalid form body means that there's something wrong with what you are trying to return, such as invalid Fields. We need more information. |
Beta Was this translation helpful? Give feedback.
-
@valzargaming here is full code of command, but it returns error on acknowledgeWithResponse(), code inside done is working:
|
Beta Was this translation helpful? Give feedback.
-
Out of curiosity, what happens if you use ->then instead of ->done, call getOriginalResponse inside of that scope, then put your updateOriginalResponse code inside of that? I've never used updateOriginalResponse in context of acknowledgeWithResponse before, but do something similar using only acknowlege return $interaction->acknowledge()->then(function () use ($interaction): PromiseInterface { // wait until the bot says "Is thinking..."
return $interaction->sendFollowUpMessage(MessageBuilder::new()->setContent('Working...'))->then(function (Message $message) use ($interaction): PromiseInterface {
return $interaction->sendFollowUpMessage(MessageBuilder::new()->setContent($this->civ13->verifier->process($interaction->data->options['ckey']->value, $interaction->member->id, $interaction->member)), true)->then(function (Message $message) use ($interaction): PromiseInterface {
return $interaction->updateOriginalResponse(MessageBuilder::new()->setContent("Verified request received. Please check my response for further instructions."));
});
});
}); |
Beta Was this translation helpful? Give feedback.
-
@valzargaming Code:
Bot don't say "thinking", i didnt see message working too. Error:
|
Beta Was this translation helpful? Give feedback.
-
version of lib: 7.3.3 |
Beta Was this translation helpful? Give feedback.
-
It looks like this is a bug of this bot. Cause only in this bot acknowledge() does not work. In others, on the same project - everything is ok, with the same code -_-. |
Beta Was this translation helpful? Give feedback.
-
The problem was really with the bot ;/. I created a new bot - everything worked there (with a new token). Very strange |
Beta Was this translation helpful? Give feedback.
The problem was really with the bot ;/. I created a new bot - everything worked there (with a new token). Very strange