I do not understand how to delete messages via RTM bot objects...
See original GitHub issueSlack API supports deleting messages via bot users, as far as I understand with the “as_user=true” argument in api call. In this case it is a RTM API call, not a Web API call.
It looks like this is also possible in the node-slack-sdk, but I am not able to reverse engineer the necessary code…
Something like:
var RTM_EVENTS = require('@slack/client').RTM_EVENTS;
rtm.on(RTM_EVENTS.MESSAGE, function handleRtmMessage(message) {
rtm.chat.delete("<TIMESTAMP>", "<CHANNEL-ID>", "as_user=true");
This method “chat.delete” is available for the Web API in this wrapper, but only a bot user is allowed to delete on behalf of another user.
The plan is to create a read only channel e.g. through deleting all messages from others than the channel owner…
Thanks for any hints in advance!
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
Not able to Delete message which is sent by Bot
Hi, my app has been working for many months, now I am facing the problem with deleting the message that should be deleted...
Read more >Real Time Messaging API | Slack
Event Description Works with
app_home_opened User clicked into your App Home Events
app_requested User requested an app Events
app_uninstalled Your Slack app was uninstalled. Events
Read more >Cannot delete a chat message via Slack API - Stack Overflow
I believe that a Slack user (bot or otherwise) is only allowed to delete its own messages. There's no way to delete messages...
Read more >Update and delete messages sent from your bot - Teams
To delete a message, pass that activity's ID to the DeleteActivityAsync method of the TurnContext class. For more information, see TurnContext.
Read more >RTM API Reference | LiveChat Platform Docs & API Reference
Use the Agent Chat RTM API to send messages, manage access and properties. ... Real-Time Messaging API (RTM API) is based on a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bolekkerous here my code for the Slack Read Only Channel with possibility to invite other member to post for admins… https://github.com/nohir0/slack-channel-readonly
@nohir0 - thanks a lot, I really appreciate it!