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

86 lines
1.8 KiB
Markdown
Raw Normal View History

---
sidebar_position: 11
---
# Set channel topic
Sets the channel topic
2024-07-10 13:58:29 +03:00
`Function SetChannelTopic(Val Token, Val Channel, Val Topic) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Bot token |
| Channel | --channel | String | Channel ID |
| Topic | --theme | String | Channel topic |
2024-10-09 09:42:00 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Slack
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-09-29 17:27:25 +03:00
Token = "xoxb-6965308400114-696804637...";
2024-09-29 19:41:20 +03:00
Channel = "C07PK52ES3U";
2024-09-29 17:27:25 +03:00
Topic = "TestTopic";
Result = OPI_Slack.SetChannelTopic(Token, Channel, Topic);
```
```sh title="CLI command example"
oint slack SetChannelTopic --token %token% --channel "C070VPMKN8J" --theme "TestTopic"
```
```json title="Result"
2024-08-14 09:06:31 +03:00
{
2024-10-06 16:55:08 +03:00
"ok": true,
"channel": {
2024-10-09 09:42:00 +03:00
"id": "C07R448PZJ8",
"name": "testconv2383f9a9-fc9f-4928-ba19-511c3b7e9c66",
"is_channel": true,
"is_group": false,
"is_im": false,
"is_mpim": false,
"is_private": false,
2024-10-09 09:42:00 +03:00
"created": 1728454513,
"is_archived": false,
"is_general": false,
"unlinked": 0,
2024-10-09 09:42:00 +03:00
"name_normalized": "testconv2383f9a9-fc9f-4928-ba19-511c3b7e9c66",
"is_shared": false,
"is_org_shared": false,
"is_pending_ext_shared": false,
"pending_shared": [],
"context_team_id": "T06UD92BS3C",
2024-10-09 09:42:00 +03:00
"updated": 1728454514283,
"parent_conversation": null,
"creator": "U06UG1CAYH2",
"is_ext_shared": false,
"shared_team_ids": [
2024-10-06 16:55:08 +03:00
"T06UD92BS3C"
],
"pending_connected_team_ids": [],
"is_member": false,
"topic": {
2024-10-06 16:55:08 +03:00
"value": "TestTopic",
"creator": "U06UG1CAYH2",
2024-10-09 09:42:00 +03:00
"last_set": 1728454514
},
"purpose": {
2024-10-06 16:55:08 +03:00
"value": "",
"creator": "",
"last_set": 0
},
"previous_names": []
2024-10-06 16:55:08 +03:00
}
}
```