Available methods

unbanChatSenderChat()

Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.

parameters

parametertyperequireddescription
chat_idnumber | stringrequiredUnique identifier for the target chat or username of the target channel in the format @username
sender_chat_idnumberrequiredUnique identifier of the target sender chat

returns

boolean

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 { UnbanChatSenderChatParams } from "@yaebal/types";

await bot.api.call<boolean>("unbanChatSenderChat", {
  chat_id: 123456789,
  sender_chat_id: 1,
} satisfies UnbanChatSenderChatParams);

context shortcut

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

context shortcut
/** Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns *True* on success. */
ctx.unbanChatSenderChat(params: Omit<UnbanChatSenderChatParams, "chat_id">)