1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-01 22:29:52 +02:00
Files
OpenIntegrations/docs/en/md/Slack/Channel-management/Set-channel-topic.mdx

105 lines
2.5 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 11
2025-05-05 11:15:20 +03:00
description: Set channel topic and other functions to work with Slack in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Slack]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Set channel topic
Sets the channel topic
`Function SetChannelTopic(Val Token, Val Channel, Val Topic) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Bot token |
| Channel | --channel | String | ✔ | Channel ID |
| Topic | --theme | String | ✔ | Channel topic |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Slack
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-10-21 11:36:43 +03:00
Token = "xoxb-6965308400114-696804637...";
2025-10-21 21:43:05 +03:00
Channel = "C09MRB3P6N6";
2024-10-15 10:16:04 +03:00
Topic = "TestTopic";
Result = OPI_Slack.SetChannelTopic(Token, Channel, Topic);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint slack SetChannelTopic \
2024-10-22 08:59:24 +03:00
--token "***" \
2025-10-15 14:32:00 +03:00
--channel "C09LEMNRUD9" \
2024-10-22 08:59:24 +03:00
--theme "TestTopic"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint slack SetChannelTopic ^
2024-10-22 08:59:24 +03:00
--token "***" ^
2025-10-15 14:32:00 +03:00
--channel "C09LEMNRUD9" ^
2024-10-22 08:59:24 +03:00
--theme "TestTopic"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"ok": true,
"channel": {
2025-10-15 14:32:00 +03:00
"id": "C09LEMNRUD9",
"created": 1760521294,
2025-09-12 20:23:31 +03:00
"creator": "U06UG1CAYH2",
"is_org_shared": false,
"is_im": false,
"context_team_id": "T06UD92BS3C",
2025-10-15 14:32:00 +03:00
"updated": 1760521297864,
"name": "testconvf0560358-c9cc-406f-b690-d00904ee0015",
"name_normalized": "testconvf0560358-c9cc-406f-b690-d00904ee0015",
2024-10-15 10:16:04 +03:00
"is_channel": true,
"is_group": false,
"is_mpim": false,
"is_private": false,
"is_archived": false,
"is_general": false,
"is_shared": false,
2025-09-12 20:23:31 +03:00
"is_ext_shared": false,
"unlinked": 0,
2024-10-15 10:16:04 +03:00
"is_pending_ext_shared": false,
"pending_shared": [],
"parent_conversation": null,
"purpose": {
"value": "",
"creator": "",
"last_set": 0
},
2025-09-12 20:23:31 +03:00
"topic": {
"value": "TestTopic",
"creator": "U06UG1CAYH2",
2025-10-15 14:32:00 +03:00
"last_set": 1760521297
2025-09-12 20:23:31 +03:00
},
"shared_team_ids": [
"T06UD92BS3C"
],
"pending_connected_team_ids": [],
"is_member": false,
2024-10-15 10:16:04 +03:00
"previous_names": []
}
}
```