BotService
Each call is POST {base}/sblurp.v1.BotService/<Call> with a Connect, gRPC or gRPC-Web body. See Protocol and transport for the basics. Field types in links are on the Types page. Tools can read every call and type from schema.json.
Bots
CreateBot
Admin or owner only. username is 2 to 32 of a-z, 0-9, _, . and -.
Request CreateBotRequest:
| Field | Type | Notes |
|---|---|---|
username |
string |
|
display_name |
string |
|
avatar_url |
string |
|
bio |
string |
Response CreateBotResponse:
| Field | Type | Notes |
|---|---|---|
bot |
Member | |
token |
string |
shown once; the server stores only a hash |
ListBots
Any member.
Request ListBotsRequest:
No fields.
Response ListBotsResponse:
| Field | Type | Notes |
|---|---|---|
bots |
repeated Member |
RotateBotToken
Admin or owner only. The old token stops working at once.
Request RotateBotTokenRequest:
| Field | Type | Notes |
|---|---|---|
bot_id |
string |
Response RotateBotTokenResponse:
| Field | Type | Notes |
|---|---|---|
token |
string |
DeleteBot
Admin or owner only. The bot's messages stay; its username is freed.
Request DeleteBotRequest:
| Field | Type | Notes |
|---|---|---|
bot_id |
string |
Response DeleteBotResponse:
No fields.
ListPlugins
Admin or owner only, like everything below.
Request ListPluginsRequest:
No fields.
Response ListPluginsResponse:
| Field | Type | Notes |
|---|---|---|
plugins |
repeated Plugin |
InstallPlugin
Installs or replaces .js and starts it. The source must compile and run its top level within the time limit, or nothing changes. 256 KB max.
Request InstallPluginRequest:
| Field | Type | Notes |
|---|---|---|
name |
string |
a valid username; a trailing ".js" is dropped |
source |
string |
Response InstallPluginResponse:
| Field | Type | Notes |
|---|---|---|
plugin |
Plugin |
SetPluginEnabled
Disabling stops the plugin and keeps its file as .js.disabled.
Request SetPluginEnabledRequest:
| Field | Type | Notes |
|---|---|---|
name |
string |
|
enabled |
bool |
Response SetPluginEnabledResponse:
| Field | Type | Notes |
|---|---|---|
plugin |
Plugin |
DeletePlugin
Deletes the file and the plugin's bot. The bot's messages stay.
Request DeletePluginRequest:
| Field | Type | Notes |
|---|---|---|
name |
string |
Response DeletePluginResponse:
No fields.
View this page as Markdown · Glossary · API schema.json · openapi.json