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
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | string | required | Unique identifier for the target chat or username of the target channel in the format @username |
sender_chat_id | number | required | Unique 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.
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.
/** 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">)official Bot API docs: https://core.telegram.org/bots/api/#unbanchatsenderchat