1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/VKTeams/Chat-management/Set-chat-title.mdx

71 lines
1.5 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-08-18 17:47:59 +03:00
sidebar_position: 12
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-08-18 17:47:59 +03:00
# Set chat title
Sets new chat title
`Function SetChatTitle(Val Token, Val ChatID, Val Text) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Bot token |
| ChatID | --chatid | String, Number | ✔ | Chat ID |
| Text | --text | String | ✔ | Title text |
2024-08-18 17:47:59 +03:00
2024-10-09 09:42:00 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from VK Teams
2024-08-18 17:47:59 +03:00
<br/>
:::tip
2024-11-21 13:27:18 +03:00
To call this method, the bot must be an administrator in the chat room.
Method at API documentation: [GET ​​/chats/setTitle](https://teams.vk.com/botapi/#/chats/get_chats_setTitle)
2024-08-18 17:47:59 +03:00
:::
<br/>
2024-12-16 19:38:57 +03:00
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-09-24 11:38:18 +03:00
Token = "001.3501506236.091...";
ChatID = "689203963@chat.agent";
2024-08-18 17:47:59 +03:00
Text = "New title";
Result = OPI_VKTeams.SetChatTitle(Token, ChatID, Text);
```
2024-10-15 09:53:37 +03:00
2024-08-18 17:47:59 +03:00
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint vkteams SetChatTitle \
2024-10-22 08:59:24 +03:00
--token "***" \
--chatid "689203963@chat.agent" \
--text "New title"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint vkteams SetChatTitle ^
2024-10-22 08:59:24 +03:00
--token "***" ^
--chatid "689203963@chat.agent" ^
--text "New title"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-08-18 17:47:59 +03:00
```json title="Result"
2024-08-18 21:41:41 +03:00
{
"ok": true
}
2024-08-18 17:47:59 +03:00
```