Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default

Hierarchy

  • default

Index

Constructors

constructor

Properties

client

client: Client

Methods

create

  • create(data: { name: string }): Promise<{ bot: Bot; user: User }>
  • Create a bot

    Parameters

    • data: { name: string }

      Bot creation data

      • name: string

    Returns Promise<{ bot: Bot; user: User }>

delete

  • delete(id: string): Promise<void>
  • Delete a bot

    Parameters

    • id: string

      Bot ID

    Returns Promise<void>

edit

  • edit(id: string, data: { interactionsURL?: string; name?: string; public?: boolean; remove?: "InteractionsURL" }): Promise<void>
  • Edit a bot

    Parameters

    • id: string

      Bot ID

    • data: { interactionsURL?: string; name?: string; public?: boolean; remove?: "InteractionsURL" }

      Bot edit data object

      • Optional interactionsURL?: string
      • Optional name?: string
      • Optional public?: boolean
      • Optional remove?: "InteractionsURL"

    Returns Promise<void>

fetch

  • fetch(id: string): Promise<{ bot: Bot; user: User }>
  • Fetch a bot

    Parameters

    • id: string

      Bot ID

    Returns Promise<{ bot: Bot; user: User }>

    Bot and User object

fetchOwned

  • fetchOwned(): Promise<{ bots: Bot[]; users: User[] }>

fetchPublic

  • fetchPublic(id: string): Promise<PublicBot>
  • Fetch a public bot

    Parameters

    • id: string

      Bot ID

    Returns Promise<PublicBot>

    Public Bot object

invite

  • invite(id: string, destination: { server: string } | { group: string }): Promise<undefined>
  • Invite a public bot

    Parameters

    • id: string

      Bot ID

    • destination: { server: string } | { group: string }

      The group or server to add to

    Returns Promise<undefined>

Generated using TypeDoc