Created
July 26, 2023 04:20
-
-
Save brettinternet/774afff99277352f717a5b2d6ccc31c2 to your computer and use it in GitHub Desktop.
Delete your own messages in Slack channels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from slack_cleaner2 import * | |
s = SlackCleaner('TOKEN') | |
channel = "CHANNEL_NAME" | |
for msg in s.c[channel].msgs(with_replies=True): | |
if msg.user == s.myself: | |
print(f"DELETED: {msg.text}") | |
msg.delete(replies=True, files=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment