replaceManagedBotToken()
Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as String on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | User identifier of the managed bot whose token will be replaced |
returns
string
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { ReplaceManagedBotTokenParams } from "@yaebal/types";
await bot.api.call<string>("replaceManagedBotToken", {
user_id: 123456789,
} satisfies ReplaceManagedBotTokenParams);context shortcut
also available as ctx.replaceManagedBotToken() on
16
context types — see @yaebal/contexts.
/** Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as *String* on success. */
ctx.replaceManagedBotToken(params?: Omit<ReplaceManagedBotTokenParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#replacemanagedbottoken