1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-02-03 13:22:19 +02:00

49 lines
1.0 KiB
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 |
Returns: Map Of KeyAndValue - Serialized JSON response from Telegram
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-09-17 12:29:46 +03:00
Token = FunctionParameters["Telegram_Token"];
UserID = FunctionParameters["Telegram_ChatID"];
ChannelID = FunctionParameters["Telegram_ChannelID"];
2024-08-13 16:47:32 +03:00
Result = OPI_Telegram.Unban(Token, ChannelID, UserID);
```
```sh title="CLI command example"
oint telegram Unban --token "6129457865:AAFyzNYOAFbu..." --chat %chat% --user "461699897"
```
```json title="Result"
2024-08-14 09:06:31 +03:00
{
"ok": false,
"error_code": 400,
"description": "Bad Request: can't remove chat owner"
}
```