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
McTrade is a bot exploiting Binance API, open source! built in python !

Open Source Crypto Trading Bot using Binance API Report Bug · Request Feature Table of Contents About The Project Built With Getting Started Prerequis

Raphael Cohen 5 Jul 17, 2022
Auto-Rollnumber-sender - Auto Rollnumber sender with python

Auto-Rollnumber-sender The above code fits better on my system but it can vary s

Riya Tripathi 2 Feb 14, 2022
A simple fun discord bot using discord.py that can post memes

A simple fun discord bot using discord.py * * Commands $commands - to see all commands $meme - for a random meme from the internet $cry - to make the

Dice Flip 2 Dec 20, 2021
一个基于Python3的Bot。目前支持以Docker的方式部署在vps上。支持Aria2、本子下载、网易云音乐下载、Pixiv榜单下载、Youtue-dl支持、搜图。

介绍 一个基于Python3的Bot。目前支持以Docker的方式部署在vps上。 主要功能: 文件管理 修改主界面为 filebrowser,账号为admin,密码为admin,主界面路径:http://ip:port,请自行修改密码 FolderMagic自带的webdav:路径:http://

Ben 650 Jan 08, 2023
Mark Sullivan 66 Dec 13, 2022
Fortnite Dumper for anyone's Save the World profiles.

Anyone's Fortnite Save the World Profile Dumper This program allows you to dump anyone's Fortnite Save the World Profiles. How to use it? After starti

PRO100KatYT 6 Apr 13, 2022
Discord Selfbot, 90+ commands

Setting the bot up. STEP 1: copy the directory yook.club selfbot was downloaded and extracted into, open cmd and type "cd " then paste. STEP 2: python

yook 1 Dec 12, 2021
A beginner’s guide to train and deploy machine learning pipelines in Python using PyCaret

This model involves Insurance bill prediction, which was subsequently deployed on Heroku PaaS

1 Jan 27, 2022
A Telegram AntiChannel bot to ban users who using channel to send message in group

Anti-Channel-bot A Telegram AntiChannel bot to ban users who using channel to send message in group. BOT LINK: Features: Automatic ban Whitelist Unban

Jigar varma 36 Oct 21, 2022
szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❤️

szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❤️

szsupunma 93 Jan 07, 2023
Python API Client for Close

Close API A convenient Python wrapper for the Close API. API docs: http://developer.close.com Support: Close 56 Nov 30, 2022

Brute Force Attack On Facebook Accounts

Brute Force Attack On Facebook Accounts For Install: pkg install update && pkg upgrade -y pkg install python pip install requests pip install mechani

MK X Shaon 1 Oct 30, 2021
Buscar y descargar canciones de YouTube automáticamente desde la web

🎶 DescargarCanciones 🎶 Buscar y descargar canciones o playlist de Spotify o YouTube automáticamente con todos los metadatos de la canciones en forma

1 Dec 20, 2021
ML-Test-Client

ML-Test-Client Introduction What is this? This Test Client App is to be used to crowd-test machine learning models with the goal of finding the best c

11 Jul 15, 2022
Python Telegram Bot Template

Python Telegram Bot Template Concepts Customizable python-telegram-bot template implementing code refactoring to streamline development process: handl

Jansen A. Simanullang 1 Jan 25, 2022
Skyscanner Python SDK

Skyscanner Python SDK Important As of May 1st, 2020, the project is deprecated and no longer maintained. The latest update in v1.1.5 includes changing

Skyscanner 118 Sep 23, 2022
Shiny Wechat Pay SDK for Python

WeChat third-party Python SDK master: Read the Documentation Features Common public platforms passively respond and actively call APIs WeChat Pay API

Obrisk 18 Sep 05, 2022
Cryptocurrency Prices Telegram Bot For Python

Cryptocurrency Prices Telegram Bot How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOKEN: export TELEGRAM_BOT_TOKEN=your_

Sina Nazem 3 Oct 31, 2022
Generate Heroku-like random names to use in your python applications

HaikunatorPY Generate Heroku-like random names to use in your python applications. Installation pip install haikunator Usage Haikunator is pretty sim

Atrox 116 Nov 15, 2022
Python Client for Instagram API

This project is not actively maintained. Proceed at your own risk! python-instagram A Python 2/3 client for the Instagram REST and Search APIs Install

Facebook Archive 2.9k Jan 01, 2023