Skip to main content

Set Commands

You need to send a POST request to:

https://yoai.yophone.com/api/pub/setCommands

Request body params format (JSON)#

  • commands list of commands to be set (required): Each command should have:
    • command (string): The command keyword (e.g., "start").
    • description (string): A brief explanation of what the command does.

Request example (POST):#

Expecting Message format#

{  "commands": [    {      "command": "start",      "description": "Starts the bot"    },    {      "command": "help",      "description": "Shows available commands"    }  ]}

Success Response#

The API returns a JSON object indicating the success of the operation.

{  "code": 200,  "success": true,  "data": null}

Failure Response#

The API returns a JSON object indicating the success of the operation.

{  "code": 200,  "success": false,  "message": "failed to send"}