Comments (6)
is tech-setup
a public channel? it if is a private one you have to use the --group
instead
can you do me a favor and try the develop version of this package: https://github.com/sgratzl/slack-cleaner/tree/develop
it has a different idea and requires python coding but you will have way more control what you wanna do
pip install slack_cleaner2
from slack_cleaner2 import *
s = SlackCleaner('XXXXXXXXXXXXXXXXX', sleep_for=1)
tech_setup = [c for c in s.conversations if c.name == 'tech-setup'][0]
for msg in tech_setup.msgs():
msg.delete()
s.log.summary()
from slack-cleaner.
@titaniumbones did you have time to try out the slack_cleaner2 version?
from slack-cleaner.
Hello sgratzl, I've been experimenting with the dev branch (slack_cleaner2), but I'm not sure, how could I delete all dm between two users? Any examples? I can see conversations bearing user names but I don't understand how I'd code this... Many thanks!
from slack-cleaner.
first, you can only delete the direct messages from the owner of the token but not other ones :(
from slack_cleaner2 import *
s = SlackCleaner('XXXXXXXXXXXXXXXXX', sleep_for=1)
total_delete = 0
for c in s.ims:
for msg in c.msgs():
if (c.user and c.user.bot) or msg.user == s.myself or msg.bot:
if msg.delete() is None:
total_delete += 1
should delete all direct instant messages that are accessible from the current token (s.ims
), iterate over all messages of each channel (c.msgs()
), and tries to delete the message if it is written by me (msg.user == s.myself
) a bot message (msg.bot
I or by a bot user (c.user and c.user.bot
)
from slack-cleaner.
I think this is resolved with the current version! Closing for now but @simmessa feel free to open a new issue if yours isn't resolved.
from slack-cleaner.
Unfurtunately I lost access to the slack environment where I ran slack-cleaner so I won't be able to test this again but hey @titaniumbones thanks for the update!
from slack-cleaner.
Related Issues (20)
- missing_argument error when trying to use provided example HOT 4
- slacker.Error: invalid_auth HOT 2
- how 'catch' "unknown error occurred" ? HOT 2
- Mac M1 Support HOT 3
- Enterprise Grid
- Unable to delete messages from private channel HOT 4
- slacker.Error: thread_not_found HOT 1
- conversations.list limit 100 default issue HOT 2
- Does this script support Free and Enterprise Slack Orgs? HOT 1
- Can't delete messages HOT 8
- Can't see privat channels HOT 3
- Docker image returning error HOT 1
- Delete Slack channel HOT 1
- What OAuth scope/method is needed to be able to bulk delete messages HOT 1
- slacker.Error: invalid_auth HOT 1
- AttributeError: 'Slacker' object has no attribute 'conversations' HOT 1
- slacker.Error: invalid_auth HOT 8
- slacker.Error: method_deprecated HOT 4
- Does not delete Tombstoned files HOT 2
- Provide a slack app manifest.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack-cleaner.