Skip to content

Commit

Permalink
Update API.md
Browse files Browse the repository at this point in the history
  • Loading branch information
D1veer authored Jan 12, 2024
1 parent c9b1027 commit 6ebdd39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $promise = $api->sendMessage("guild_id or null for DMs", "channel_id or user_id
// but be sure to register your callbacks before finishing.

//To handle both resolved and rejected:
$promise->then(function(\JaxkDev\DiscordBot\Plugin\ApiResultion $resolution){
$promise->then(function(\JaxkDev\DiscordBot\Plugin\ApiResolution $resolution){
//Yay, it worked and the message was sent successfully.
echo "Resolved !";
var_dump($resolution->getData()[0]); // will dump the Message model in array index 0.
Expand All @@ -74,7 +74,7 @@ $promise->then(function(\JaxkDev\DiscordBot\Plugin\ApiResultion $resolution){
});

//Or handle just resolved:
$promise->then(function(\JaxkDev\DiscordBot\Plugin\ApiResultion $resolution){
$promise->then(function(\JaxkDev\DiscordBot\Plugin\ApiResolution $resolution){
echo "Resolved !";
//Yay, it worked and the message was sent successfully.
});
Expand Down

0 comments on commit 6ebdd39

Please sign in to comment.