Available methods

getManagedBotToken()

Use this method to get the token of a managed bot. Returns the token as String on success.

parameters

parametertyperequireddescription
user_idnumberrequiredUser identifier of the managed bot whose token will be returned

returns

string

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { GetManagedBotTokenParams } from "@yaebal/types";

await bot.api.call<string>("getManagedBotToken", {
  user_id: 123456789,
} satisfies GetManagedBotTokenParams);

context shortcut

also available as ctx.getManagedBotToken() on 16 context types — see @yaebal/contexts.

context shortcut
/** Use this method to get the token of a managed bot. Returns the token as *String* on success. */
ctx.getManagedBotToken(params?: Omit<GetManagedBotTokenParams, "user_id">)