DEV Community

Zacchaeus Bolaji
Zacchaeus Bolaji

Posted on

1 1

Twitter Blocker Bot

Recently, someone on twitter suggested a twitter bot that helps block a user. The idea is that most times we block users later, but may not be able to remember exactly why we blocked them later. The @TweepBlock is bot here to solve that tiny problem.

How It works
Comment on the user's post and mention @TweepBlocker. If you've authorized the bot before, it'll block the user for you and reply when it's done.

If you haven't authorized the bot before, it replies with a link for you to authenticate. Once authentication is done, it blocks the user.

You can view a list of users you've blocked with the bot by visiting https://twitter-please-block.herokuapp.com/user/ where should be replaced with your twitter username.

The source code can be found here https://github.com/djunehor/twitter-blocker in case you need to see the inner workings and maybe suggest an improvement.

As a side feature: the bot keeps a log of tweets that caused the block. So even if the user deletes the tweet, you can still dig it up

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay