1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-07 23:03:08 +02:00
Files
OpenIntegrations/docs/en/md/Telegram/Administration/Unban.md

47 lines
942 B
Markdown
Raw Normal View History

---
sidebar_position: 2
---
# Unban
Unbans a previously banned user
2024-07-10 13:58:29 +03:00
`Function Unban(Val Token, Val ChatID, Val UserID) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Bot token |
| ChatID | --chat | String, Number | Target chat ID or ChatID*TopicID |
| UserID | --user | String, Number | Target user ID |
2024-10-09 09:42:00 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Telegram
2024-07-10 14:05:58 +03:00
<br/>
2024-10-11 09:59:59 +03:00
:::tip
Method at API documentation: [unbanChatMember](https://core.telegram.org/bots/api#unbanchatmember)
:::
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-09-24 11:38:18 +03:00
Token = "6129457865:AAFyzNYOAFbu...";
UserID = "461699897";
ChannelID = "@testsichee";
2024-08-13 16:47:32 +03:00
Result = OPI_Telegram.Unban(Token, ChannelID, UserID);
```
2024-10-15 09:53:37 +03:00
```json title="Result"
2024-08-14 09:06:31 +03:00
{
2024-10-06 16:55:08 +03:00
"ok": false,
"error_code": 400,
"description": "Bad Request: can't remove chat owner"
}
```