This bot will pull a stream of tweets based on rules you set and automatically reply to them.

Overview

Twitter reply bot

This bot will pull a stream of tweets based on rules you set and automatically reply to them.

I built this bot in order to help combat scam bots in twitter, I am using this to look for the scam messages on the Tiktok support page and warn the original poster that it may be a scam.

Setup

In order to use this bot you will need to have a Twitter developer account, this can be requested from here https://developer.twitter.com/

once made you will need your API key, secret and generate a Bearer token. The bearer token is used to pull down the livestream of tweets but in order to post tweets it also requires the API key and Secret

this code only requires one module install but to ensure you have the correct version I recommend installing from the requirements file using the command below

python -m pip install -r requirements.txt

When you run the code it will provide a Twitter authorisation link and ask for a pin. When going to this link it will prompt you to allow the app access to the twitter account. This is how it authenticates for posting the reply's and it will use the account you authorise for the posts. This prompt will happen every time you run the code allowing to to easily change which account posts the replies.

NOTE: make sure to check which account you are authorising to post. I have accidentally used my personal account while testing this by not paying attention at this stage

Setting rules

The bot will reply to any message that match on the rules list within the code (This is under the Main function at the bottom)

Below is the rule set that I used to test against the Tiktok Support twitter looking for scam messages

  sample_rules = [
        {"value": "TikTokSupport DM Instagram -from:cybersafetybot1"},
        {"value": "TikTokSupport on Instagram helped me -from:cybersafetybot1"},
        {"value": "TikTokSupport via IG -from:cybersafetybot1"},
        {"value": "TikTokSupport inbox recover -from:cybersafetybot1"},
        {"value": "TikTokSupport referred to unbanned -from:cybersafetybot1"},
        {"value": "TikTokSupport send a message to -from:cybersafetybot1"},
        {"value": "TikTokSupport recovered my account for me -from:cybersafetybot1"},
        {"value": "TikTokSupport my account got same issues -from:cybersafetybot1"},
    ]

The each line is a separate rule and works independantly from each other. the stream will find tweets that contain any of the words within the value section. the flag -from:cybersafteybot1 means that it will ignore messaged from the account CyberSafteybot1 Ensure to add your account into this field so that the bot doesnt flag your replies. For more information on Rule Operators and constructs see here https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule

Owner
Brains
Brains
Louis Manager Bot With Python

✨ Natsuki ✨ Are You Okay Baby I'm Natsuki Unmaintained. The new repo of @TheNatsukiBot is public. ⚡ (It is no longer based on this source code. The co

Team MasterXBots 1 Nov 07, 2021
Discord Voice Channel Automatic Online

Discord-Selfbot-voice Features: Discord Voice Channel Automatic Online FAQ Q: How can I obtain my token? A: 1. How to obtain your token in android 2.

Pranav Ajay 3 Oct 31, 2022
A tool for creating credentials for accessing S3 buckets

s3-credentials A tool for creating credentials for accessing S3 buckets For project background, see s3-credentials: a tool for creating credentials fo

Simon Willison 138 Jan 06, 2023
:snake: Python SDK to query Scaleway APIs.

Scaleway SDK Python SDK to query Scaleway's APIs. Stable release: Development: Installation The package is available on pip. To install it in a virtua

Scaleway 114 Dec 11, 2022
A simple API wrapper for Discord written in Python.

AIOCord This project is work in progress not for production use A simple asynchronous API wrapper around Discord API written in Python. Inspiration Th

Izhar Ahmad 3 Dec 07, 2021
Python package and CLI for user-friendly integration with SAS Viya

sasctl A user-friendly Python interface for SAS Viya. Full documentation: https://sassoftware.github.io/python-sasctl Table of Contents Overview Prere

SAS Software 30 Dec 14, 2022
Basic query to access Traindex API

traindex-api-query Basic query to access Traindex API Please make sure to provide your Traindex API key to the line 8 in the script file. There are tw

Foretheta 1 Nov 11, 2021
Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and also everything you could possibly need for raids

Discord Panel Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and al

11 Mar 30, 2022
A slack bot that notifies you when a restaurant is available for orders

Slack Wolt Notifier A Slack bot that notifies you when a Wolt restaurant or venue is available for orders. How does it work? Slack supports bots that

Gil Matok 8 Oct 24, 2022
A zero-dependency Python library for getting the Kubernetes token of a AWS EKS cluster

tokeks A zero-dependency Python library for getting the Kubernetes token of a AWS EKS cluster. No AWS CLI, third-party client or library (boto3, botoc

Chris Karageorgiou Kaneen 6 Nov 04, 2022
This bot automaticaly access to giveaway ! You can won free NFT !

This bot automaticaly access to giveaway ! You can won free NFT !

2s.py 28 Oct 20, 2022
8300-account-nuker - A simple accoutn nuker or can use it full closing dm and leaving server

8300 ACCOUNT NUKER VERISON: its just simple accoutn nuker or can use it full clo

†† 5 Jan 26, 2022
A collection of tools for managing Jira issues for the RHODS project

RHODS-Jira-Tools A collection of tools for managing Jira issues for the RHODS project move_to_qa.py This script handles transitioning a given Jira iss

Alex Corvin 1 Sep 20, 2022
A full-fledged discord bot with moderation and a lot more.

HOT-BOT-POL-POT ⭐ Star me on GitHub m'lady.... hot-bot-pol-pot is a moderation discord bot written using enhanced-dpy library with many functionalitie

Pure Cheekbones 4 Oct 08, 2022
A python crypto trading bot on Binance using RSI in 25 Lines 🚀

RSI Crypto Trading Bot - Binance A Crypto Trading Bot on Binance trading BTCUSDT and ETHUSDT using RSI in 25 Lines of Code Getting Started Note Python

Blankly Finance 10 Dec 26, 2022
A multi exploit instagram exploitation framework

Instagram Exploitation Framework About IEF Is an open source Instagram Exploitation Framework with various Exploits that could be used to mod your pro

Instagram Exploitation Framework - BirdSecurity 1 May 23, 2022
A chatbot on Telegram using technologies of cloud computing.

Chatbot This project is about a chatbot on Telegram to study the cloud computing. You can refer to the project of chatbot-deploy which is conveinent f

Jeffery 4 Apr 24, 2022
Telegram bot to download tiktok video/audio

TikTokDL (Bot) Telegram RoBot to Download Tiktok video/audio. Features: 👉 Download TikTok Video without Watermark 👉 Download TikTok Video with Water

X-Noid 23 Nov 21, 2022
Troposphere and shellscript based AWS infrastructure automation creates an awsapigateway lambda with a go backend

Automated-cloudformation-infra Troposphere and shellscript based AWS infrastructure automation. Feel free to clone and edit for personal usage. The en

1 Jan 03, 2022
Zero2 Discord bot is written with Discord.py using Python.

Zero2 Discord bot is written with Discord.py using Python.

Siva Avanish 4 Nov 08, 2021