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
unbanChatSenderChat is directly typed on Api — call it straight off bot.api.
import type { UnbanChatSenderChatParams } from "@yaebal/types";
await bot.api.unbanChatSenderChat({
chat_id: 123456789,
sender_chat_id: 1,
} satisfies UnbanChatSenderChatParams);context shortcut
also available as ctx.unbanChatSenderChat() on
17
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