mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-20 20:15:34 -04:00
Use Username for bot name.
This commit is contained in:
+9
-9
@@ -13,13 +13,13 @@ resource('/bots/create', {
|
||||
"Create a new Revolt bot.",
|
||||
{
|
||||
...await body("Bot Details", schema`
|
||||
import type { Username } from './Users';
|
||||
|
||||
interface ${'BotDetails'} {
|
||||
/**
|
||||
* Bot name
|
||||
* @minLength 1
|
||||
* @maxLength 32
|
||||
* Bot username
|
||||
**/
|
||||
name: string;
|
||||
name: Username;
|
||||
}
|
||||
`),
|
||||
...await success(
|
||||
@@ -63,13 +63,13 @@ resource('/bots/:bot', {
|
||||
"Edit bot details.",
|
||||
{
|
||||
...await body("Requested changes to bot object.", schema`
|
||||
import type { Username } from './Users';
|
||||
|
||||
interface ${'EditBot'} {
|
||||
/**
|
||||
* Channel name
|
||||
* @minLength 1
|
||||
* @maxLength 32
|
||||
**/
|
||||
name?: string;
|
||||
* Bot username
|
||||
*/
|
||||
name?: Username;
|
||||
|
||||
/**
|
||||
* Whether the bot can be added by anyone
|
||||
|
||||
Reference in New Issue
Block a user