|
| 1 | +--- |
| 2 | +title: "Reference: protocol.bots.v1" |
| 3 | +--- |
| 4 | +## Bot Invite Codes |
| 5 | + |
| 6 | +Bot invite codes work similarly to HMC URLs. |
| 7 | +They can either be server+code or just code, |
| 8 | +to refer to a bot on the current homeserver. |
| 9 | + |
| 10 | +The format for an invite code is: |
| 11 | +> [url[:port]/]code |
| 12 | +
|
| 13 | +where `code` is a purely alphanumeric code. |
| 14 | + |
| 15 | +# Services |
| 16 | + |
| 17 | +## <span class="codicon codicon-symbol-class symbol-class"></span>BotsService |
| 18 | + |
| 19 | +The Bots service allows the management of bot accounts |
| 20 | +<span class="h3" aria-level="3">Fields</span> |
| 21 | +#### <span class="codicon codicon-symbol-method symbol-method"></span>MyBots |
| 22 | +[protocol.bots.v1.MyBotsRequest](#mybotsrequest) -> [protocol.bots.v1.MyBotsResponse](#mybotsresponse) |
| 23 | + |
| 24 | +Gets the list of bots that you own |
| 25 | + |
| 26 | +<br/> |
| 27 | + |
| 28 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>MyBotsRequest |
| 29 | +Request type for MyBots |
| 30 | + |
| 31 | +This item has no fields. |
| 32 | + |
| 33 | + |
| 34 | +<br/> |
| 35 | + |
| 36 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>MyBotsResponse |
| 37 | +Response type for MyBots |
| 38 | + |
| 39 | +<span class="h5" aria-level="5">Fields</span> |
| 40 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>bots |
| 41 | +Type: repeated [protocol.bots.v1.Bot](#bot) |
| 42 | + |
| 43 | +The list of owned bots |
| 44 | + |
| 45 | +------ |
| 46 | +#### <span class="codicon codicon-symbol-method symbol-method"></span>GetBot |
| 47 | +[protocol.bots.v1.GetBotRequest](#getbotrequest) -> [protocol.bots.v1.GetBotResponse](#getbotresponse) |
| 48 | + |
| 49 | +Gets information on a given bot |
| 50 | + |
| 51 | +<br/> |
| 52 | + |
| 53 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>GetBotRequest |
| 54 | +Request type for GetBot |
| 55 | + |
| 56 | +<span class="h5" aria-level="5">Fields</span> |
| 57 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id |
| 58 | +Type: optional `uint64` |
| 59 | + |
| 60 | +The bot to get the information of |
| 61 | + |
| 62 | + |
| 63 | +<br/> |
| 64 | + |
| 65 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>GetBotResponse |
| 66 | +Response type for GetBot |
| 67 | + |
| 68 | +<span class="h5" aria-level="5">Fields</span> |
| 69 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>bot |
| 70 | +Type: optional [protocol.bots.v1.Bot](#bot) |
| 71 | + |
| 72 | +The requested bot |
| 73 | + |
| 74 | +------ |
| 75 | +#### <span class="codicon codicon-symbol-method symbol-method"></span>CreateBot |
| 76 | +[protocol.bots.v1.CreateBotRequest](#createbotrequest) -> [protocol.bots.v1.CreateBotResponse](#createbotresponse) |
| 77 | + |
| 78 | +Creates a new bot account |
| 79 | + |
| 80 | +<br/> |
| 81 | + |
| 82 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>CreateBotRequest |
| 83 | +Request type for CreateBot |
| 84 | + |
| 85 | +<span class="h5" aria-level="5">Fields</span> |
| 86 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>display_name |
| 87 | +Type: optional `string` |
| 88 | + |
| 89 | +The bot's display name |
| 90 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>avatar_url |
| 91 | +Type: optional `string` |
| 92 | + |
| 93 | +The bot's avatar URL |
| 94 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>invite |
| 95 | +Type: optional `string` |
| 96 | + |
| 97 | +The bot's invite code, if it has one |
| 98 | + |
| 99 | + |
| 100 | +<br/> |
| 101 | + |
| 102 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>CreateBotResponse |
| 103 | +Response type for CreateBot |
| 104 | + |
| 105 | +<span class="h5" aria-level="5">Fields</span> |
| 106 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id |
| 107 | +Type: optional `uint64` |
| 108 | + |
| 109 | +The newly minted ID of the bot |
| 110 | + |
| 111 | +------ |
| 112 | +#### <span class="codicon codicon-symbol-method symbol-method"></span>EditBot |
| 113 | +[protocol.bots.v1.EditBotRequest](#editbotrequest) -> [protocol.bots.v1.EditBotResponse](#editbotresponse) |
| 114 | + |
| 115 | +Modifies a bot account that you own |
| 116 | + |
| 117 | +<br/> |
| 118 | + |
| 119 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>EditBotRequest |
| 120 | +Request type for EditBot |
| 121 | + |
| 122 | +<span class="h5" aria-level="5">Fields</span> |
| 123 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id |
| 124 | +Type: optional `uint64` |
| 125 | + |
| 126 | +The ID of the bot to edit |
| 127 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>new_display_name |
| 128 | +Type: optional `string` |
| 129 | + |
| 130 | +The bot's new display name |
| 131 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>new_avatar_url |
| 132 | +Type: optional `string` |
| 133 | + |
| 134 | +The bot's new avatar URL |
| 135 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>invite |
| 136 | +Type: optional `string` |
| 137 | + |
| 138 | +The bot's new invite code |
| 139 | + |
| 140 | + |
| 141 | +<br/> |
| 142 | + |
| 143 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>EditBotResponse |
| 144 | +Response type for EditBot |
| 145 | + |
| 146 | +This item has no fields. |
| 147 | + |
| 148 | +------ |
| 149 | +#### <span class="codicon codicon-symbol-method symbol-method"></span>DeleteBot |
| 150 | +[protocol.bots.v1.DeleteBotRequest](#deletebotrequest) -> [protocol.bots.v1.DeleteBotResponse](#deletebotresponse) |
| 151 | + |
| 152 | +Deletes a bot account that you own |
| 153 | + |
| 154 | +<br/> |
| 155 | + |
| 156 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>DeleteBotRequest |
| 157 | +Request type for DeleteBot |
| 158 | + |
| 159 | +<span class="h5" aria-level="5">Fields</span> |
| 160 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id |
| 161 | +Type: optional `uint64` |
| 162 | + |
| 163 | +The bot to delete |
| 164 | + |
| 165 | + |
| 166 | +<br/> |
| 167 | + |
| 168 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>DeleteBotResponse |
| 169 | +Response type for DeleteBot |
| 170 | + |
| 171 | +This item has no fields. |
| 172 | + |
| 173 | +------ |
| 174 | +#### <span class="codicon codicon-symbol-method symbol-method"></span>Policies |
| 175 | +[protocol.bots.v1.PoliciesRequest](#policiesrequest) -> [protocol.bots.v1.PoliciesResponse](#policiesresponse) |
| 176 | + |
| 177 | +Server policies for bot accounts that the client |
| 178 | +may display in its UI or restrict actions to prevent |
| 179 | +request errors |
| 180 | + |
| 181 | +<br/> |
| 182 | + |
| 183 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>PoliciesRequest |
| 184 | +Request type for Policies |
| 185 | + |
| 186 | +This item has no fields. |
| 187 | + |
| 188 | + |
| 189 | +<br/> |
| 190 | + |
| 191 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>PoliciesResponse |
| 192 | +Response type for Policies |
| 193 | + |
| 194 | +<span class="h5" aria-level="5">Fields</span> |
| 195 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>max_bots |
| 196 | +Type: optional `uint32` |
| 197 | + |
| 198 | +How many bots an individual account is allowed to own |
| 199 | + |
| 200 | +------ |
| 201 | +#### <span class="codicon codicon-symbol-method symbol-method"></span>AddBot |
| 202 | +[protocol.bots.v1.AddBotRequest](#addbotrequest) -> [protocol.bots.v1.AddBotResponse](#addbotresponse) |
| 203 | + |
| 204 | +Requests a bot to add itself to the guild. |
| 205 | + |
| 206 | +For cross-server bots, this dispatches a UserInvited |
| 207 | +request across sync, inviting the bot to the guild. |
| 208 | + |
| 209 | +<br/> |
| 210 | + |
| 211 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>AddBotRequest |
| 212 | +Request type for AddBot |
| 213 | + |
| 214 | +<span class="h5" aria-level="5">Fields</span> |
| 215 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>guild_id |
| 216 | +Type: optional `uint64` |
| 217 | + |
| 218 | +The guild to add the bot to |
| 219 | +###### <span class="codicon codicon-symbol-field symbol-field"></span>invite_code |
| 220 | +Type: optional `string` |
| 221 | + |
| 222 | +The bot's invite code. |
| 223 | + |
| 224 | + |
| 225 | +<br/> |
| 226 | + |
| 227 | +##### <span class="codicon codicon-symbol-structure symbol-structure"></span>AddBotResponse |
| 228 | +Response type for AddBot |
| 229 | + |
| 230 | +This item has no fields. |
| 231 | + |
| 232 | +# Standalone Message Types |
| 233 | + |
| 234 | +## <span class="codicon codicon-symbol-structure symbol-structure"></span>Bot |
| 235 | +A description of a bot account |
| 236 | + |
| 237 | +<span class="h3" aria-level="3">Fields</span> |
| 238 | +### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id |
| 239 | +Type: optional `uint64` |
| 240 | + |
| 241 | +The ID of the bot |
| 242 | +### <span class="codicon codicon-symbol-field symbol-field"></span>display_name |
| 243 | +Type: optional `string` |
| 244 | + |
| 245 | +The bot's display name |
| 246 | +### <span class="codicon codicon-symbol-field symbol-field"></span>avatar_url |
| 247 | +Type: optional `string` |
| 248 | + |
| 249 | +The bot's avatar URL |
| 250 | +### <span class="codicon codicon-symbol-field symbol-field"></span>invite |
| 251 | +Type: optional `string` |
| 252 | + |
| 253 | +The bot's invite code, if it has one |
| 254 | + |
| 255 | +------ |
0 commit comments