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
Network simulation tools

Overview I'm building my network simulation environments with Vagrant using libvirt plugin on a Ubuntu 20.04 system... and I always hated how boring i

Ivan Pepelnjak 219 Jan 07, 2023
Powerful Ethereum Smart-Contract Toolkit

Heimdall Heimdall is an advanced and modular smart-contract toolkit which aims to make dealing with smart contracts on EVM based chains easier. Instal

Jonathan Becker 69 Dec 26, 2022
DongTai API SDK For Python

DongTai-SDK-Python Quick start You need a config file config.json { "DongTai":{ "token":"your token", "url":"http://127.0.0.1:90"

huoxian 50 Nov 24, 2022
Low-level, feature rich and easy to use discord python wrapper

PWRCord Low-level, feature rich and easy to use discord python wrapper Important Note: At this point, this library API is considered unstable and can

MIguel Lopes 1 Dec 26, 2021
A python script that can send notifications to your phone via SMS text

Discord SMS Notification A python script that help you send text message to your phone one of your desire discord channel have a new message. The proj

2 Apr 25, 2022
Python script to backup/convert your Spotify playlists into the XSPF format.

Python script to backup/convert your Spotify playlists into the XSPF format.

Chris Ovenden 4 Jun 09, 2022
This will create new discord accounts and add them to your server

Discord-Botter This tool will create new discord accounts add them to your server, this tool needs a captcha api like capmonster.cloud or anti-captcha

Shahzain 27 Nov 30, 2022
This is Telegram Files Store Bot by @AbirHasan2005

PyroFilesStoreBot This is Telegram Parmanent Files Store Bot by @AbirHasan2005. Language: Python3 Library: Pyrogram Features: In PM Just Forward or Se

Abir Hasan 168 Dec 19, 2022
Public API client for GETTR, a "non-bias [sic] social network," designed for data archival and analysis.

GoGettr GoGettr is an API client for GETTR, a "non-bias [sic] social network." (We will not reward their domain with a hyperlink.) GoGettr is built an

Stanford Internet Observatory 72 Dec 14, 2022
Example notebooks for working with SageMaker Studio Lab. Sign up for an account at the link below!

SageMaker Studio Lab Sample Notebooks Available today in public preview. If you are looking for a no-cost compute environment to run Jupyter notebooks

Amazon Web Services 304 Jan 01, 2023
FAIR Enough Metrics is an API for various FAIR Metrics Tests, written in python

☑️ FAIR Enough metrics for research FAIR Enough Metrics is an API for various FAIR Metrics Tests, written in python, conforming to the specifications

Maastricht University IDS 3 Jul 06, 2022
Hostapd-mac-monitor - Setup a hostapd AP to conntrol the connections of specific MACs

A brief explanation This script provides way to setup a monitoring service of sp

2 Feb 03, 2022
BleachBit system cleaner for Windows and Linux

BleachBit BleachBit cleans files to free disk space and to maintain privacy. Running from source To run BleachBit without installation, unpack the tar

1.9k Jan 06, 2023
News API consisting various sources from Tanzania

Tanzania News API News API consisting various sources from Tanzania. Fork the project Clone the project git clone https://github.com/username/news-a

Innocent Zenda 6 Oct 06, 2022
Trading bot that uses Elon Musk`s tweets to know when to buy cryptocurrency.

Elonbot Trading bot that uses Elon Musk`s tweets to know when to buy cryptocurrency. Here is how it works: Subscribes to someone's (elonmusk?) tweets

153 Dec 23, 2022
YouTube bot, this is just my introduction to api and requests, this isn't intended on being an actual view bot.

YouTube bot, this is just my introduction to api and requests, this isn't intended on being an actual view bot.

Aran 2 Jul 25, 2022
Administration Panel for Control FiveM Servers From Discord

FiveM Discord Administration Panel Version 1.0.0 If you would like to report an issue or request a feature. Join our Discord or create an issue. Contr

NIma 9 Jun 17, 2022
scrape tiktok/douyin video list from specific user or keyword

get-tiktok-user-video-list scrape tiktok/douyin video list from specific user or keyword 以**https://www.douyin.com/user/MS4wLjABAAAAUpIowEL3ygUAahQB47

wanghaisheng 4 Jul 06, 2022
Client library for accessing IQM quantum computers

IQM Client Client-side library for connecting to an IQM quantum computer. Installation IQM client is not intended to be used directly by human users.

IQM 10 Dec 21, 2022
A powerfull Telegram Leech Bot

owner of this repo :- Abijthkutty contact me :- Abijth Telegram Torrent and Direct links Leecher Dont Abuse The Repo ... this is intented to run in Sm

αвιנтн 9 Jun 11, 2022