All Projects → TheLovinator1 → discord-twitter-webhooks

TheLovinator1 / discord-twitter-webhooks

Licence: GPL-3.0 license
🤖 Stream tweets to Discord

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Dockerfile
14818 projects
Procfile
174 projects

Projects that are alternatives of or similar to discord-twitter-webhooks

TwitterPiBot
A Python based bot for Raspberry Pi that grabs tweets with a specific hashtag and reads them out loud.
Stars: ✭ 85 (+80.85%)
Mutual labels:  tweets, twitter-api, tweepy
TwitterAutoReplyBot
This is a tiny Python script that replies to a specified number of tweets containing a specified hashtag.
Stars: ✭ 33 (-29.79%)
Mutual labels:  tweets, twitter-api, tweepy
Achievibit
Github Gamification - Achievements system as a GitHub WebHook.
Stars: ✭ 93 (+97.87%)
Mutual labels:  webhooks, webhook
TwitterScraper
Scrape a User's Twitter data! Bypass the 3,200 tweet API limit for a User!
Stars: ✭ 80 (+70.21%)
Mutual labels:  twitter-api, tweepy
stweet
Advanced python library to scrap Twitter (tweets, users) from unofficial API
Stars: ✭ 287 (+510.64%)
Mutual labels:  tweets, twitter-api
sre.surmon.me
💻 SRE service for Surmon.me blog.
Stars: ✭ 34 (-27.66%)
Mutual labels:  webhooks, webhook
Webhook
webhook is a lightweight incoming webhook server to run shell commands
Stars: ✭ 7,201 (+15221.28%)
Mutual labels:  webhooks, webhook
Self-Hosted-Asp.Net-WebHooks
Self hosted custom webhook receiver and sender
Stars: ✭ 50 (+6.38%)
Mutual labels:  webhooks, webhook
twitivity
🐍 Twitter Accounts Activity API Client Library for Python
Stars: ✭ 49 (+4.26%)
Mutual labels:  webhooks, twitter-api
tcWebHooks
WebHooks plugin for Teamcity. Supports many build states and payload formats.
Stars: ✭ 128 (+172.34%)
Mutual labels:  webhooks, webhook
github-release-notifier
Automatize tasks when a specific package got a new release - Github Release Notifier
Stars: ✭ 21 (-55.32%)
Mutual labels:  webhooks, webhook
nitter scraper
Scrape Twitter API without authentication using Nitter.
Stars: ✭ 31 (-34.04%)
Mutual labels:  tweets, twitter-api
SMMT
Social Media Mining Toolkit (SMMT) main repository
Stars: ✭ 116 (+146.81%)
Mutual labels:  tweets, twitter-api
Taviloglu.Wrike.ApiClient
.NET Client for Wrike API
Stars: ✭ 24 (-48.94%)
Mutual labels:  webhooks, webhook
Postmark webhooks
Lightweight quickstart app for receiving and processing webhooks from Postmark
Stars: ✭ 14 (-70.21%)
Mutual labels:  webhooks, webhook
iris
Watch on Kubernetes events, filter and send them as standard wehbook to any system
Stars: ✭ 57 (+21.28%)
Mutual labels:  webhooks, webhook
TinyFlowerBeds
Educational bot that posts a tiny flower bed on Twitter every few hours. Check it out if you're new to Python and open source!
Stars: ✭ 12 (-74.47%)
Mutual labels:  twitter-api, tweepy
Birdseed
🐦 🎲 Use Twitter's Search API to get random numbers
Stars: ✭ 81 (+72.34%)
Mutual labels:  tweets, twitter-api
Twitterdelete
💀 Delete your old, unpopular tweets.
Stars: ✭ 231 (+391.49%)
Mutual labels:  tweets, twitter-api
kafka-twitter-spark-streaming
Counting Tweets Per User in Real-Time
Stars: ✭ 38 (-19.15%)
Mutual labels:  twitter-api, tweepy

Discord-twitter-webhooks

This image shows a tweet from @Steam

Theme is https://github.com/KillYoy/DiscordNight

discord-twitter-webhooks is an automated tool that checks Twitter for new tweets and sends them to a Discord webhook.

This bot is configured with a config file (.env) or environment variables.

Features

  • Change Reddit username and subreddits to clickable links.
  • Change Twitter username and hashtags to clickable links.
  • Change t.co url to the actual url.
  • If the tweet has more than one image, it will merge them into one image in the embed.
  • Remove ®, ™ and © from the tweet text.
  • Five rules can be configured, each with a different webhook.
  • Customize the Discord embed.

Installation

You have three choices, using Docker, Heroku or install directly on your computer.

Docker

This is the recommended way to install the bot.

Docker Hub: thelovinator/discord-twitter-webhooks

  • Rename .env.example to .env and open it in a text editor (e.g., VSCode, Notepad++, Notepad) and fill it out.
    • If you can't see the file extension:
      • Windows 10: Click the View Tab in File Explorer and click the box next to File name extensions.
      • Windows 11: Click View -> Show -> File name extensions.
  • Open a terminal in the repository folder.
    • Windows 10: Shift + right-click in the folder and select Open PowerShell window here
    • Windows 11: Shift + right-click in the folder and Show more options and Open PowerShell window here
  • Run the Docker Compose file:
    • docker-compose up
      • You can stop the bot with Ctrl + c.
      • If you want to run the bot in the background, you can run docker-compose up -d.
  • You can update the container with docker-compose pull

Heroku

Link to deploy this program on Heroku

  • Fill out the form.
    • You can find more information about each environment variable in the .env.example file. If you have any questions, feel free to [contact me](#Need help?)
  • If you want to have several webhooks and/or different rules, you can add WEBHOOK_URL2/RULE2, WEBHOOK_URL3/RULE3 under Settings and then Config Vars. You can find more environment variable in the .env.example file.
  • To run the bot you have to go to Resources, Click the little pen icon besides the worker and activate it.
  • Click More in the top right corner and select View logs to see the logs and if the bot is running or not.

Install directly on your computer

This is not recommended if you don't have an init system (e.g., systemd)

  • Install the latest version of needed software:
    • Python
      • You should use the latest version.
      • You want to add Python to your PATH.
    • Poetry
      • Windows: You have to add %appdata%\Python\Scripts to your PATH for Poetry to work.
  • Download the project from GitHub with Git or download the ZIP.
    • If you want to update the bot, you can run git pull in the project folder or download the ZIP again.
  • Rename .env.example to .env and open it in a text editor (e.g., VSCode, Notepad++, Notepad) and fill it out.
    • Your settings will be stored in the .env file, not settings.py.
    • If you can't see the file extension:
      • Windows 10: Click the View Tab in File Explorer and click the box next to File name extensions.
      • Windows 11: Click View -> Show -> File name extensions.
  • Open a terminal in the repository folder.
    • Windows 10: Shift + right-click in the folder and select Open PowerShell window here
    • Windows 11: Shift + right-click in the folder and Show more options and Open PowerShell window here
  • Install requirements:
    • Type poetry install into the PowerShell window. Make sure you are in the repository folder where the pyproject.toml file is located.
      • (You may have to restart your terminal if it can't find the poetry command. Also double check it is in your PATH.)
  • Start the bot:
    • Type poetry run bot into the PowerShell window.
      • You can stop the bot with Ctrl + c.

Note: You will need to run poetry install again if poetry.lock has been modified.

Rules

More information about the rules can be found in the Twitter Documentation . Operator (AND, OR, NOT) examples can be found here.

Get everything from a user

If you want to get tweets, replies, retweets and quotes from @Steam, @Xbox and @PlayStation.

Remove/Only retweets

  • Remove retweets by adding -is:retweet to the rule:
    • RULE="(from:Steam OR from:Xbox OR from:PlayStation) -is:retweet"
      • Change -is:retweet to is:retweet to only get retweets.
      • Note that we added parentheses to group the operators together otherwise the -is:retweet would only be for Playstation.
  • If you want to get retweets (and tweets, replies, quotes) from Steam but not Xbox or PlayStation, you can use the following rule:
    • RULE="(from:Steam) OR (-is:retweet (from:Xbox OR from:PlayStation))"

Remove/Only replies

  • Remove replies by adding -is:reply to the rule.
    • RULE="(from:Steam OR from:Xbox OR from:PlayStation) -is:reply"
      • Change -is:reply to is:reply to only get replies.
      • Note that we added parentheses to group the operators together otherwise the -is:reply would only be for Playstation.
  • If you want to get replies (and tweets, retweets, quotes) from Steam but not Xbox or PlayStation, you can use the following rule:
    • RULE="(from:Steam) OR (-is:reply (from:Xbox OR from:PlayStation))"

Remove/Only quote tweets

  • Remove quote tweets by adding -is:quote to the rule:
    • RULE="(from:Steam OR from:Xbox OR from:PlayStation) -is:quote"
      • Change -is:quote to is:quote to only get quotes
      • Note that we added parentheses to group the operators together otherwise the -is:quote would only be for Playstation.
  • If you want to get quote tweets (and tweets, retweets, replies) from Steam but not Xbox or PlayStation, you can use the following rule:
    • RULE="(from:Steam) OR (-is:quote (from:Xbox OR from:PlayStation))"

Remove retweets, replies and quotes

  • If you want to only get tweets from Steam, you can use the following rule:
    • RULE="from:Steam -is:retweet -is:reply -is:quote"
  • If you have several users you have to use parentheses to group them together:
    • RULE="(from:Steam OR from:Xbox OR from:PlayStation) -is:retweet -is:reply -is:quote"

Get tweets with a specific word

  • If you want to get tweets with the words pepsi, cola or coca cola, you can use the following rule:
    • RULE='pepsi OR cola OR "coca cola"'
      • Note the double quotes around words with spaces.
      • We have to use single quotes around the rule if we used double quotes in the rule.
  • If we only want to get tweets from @Xbox that are about Halo you can use the following rule:
    • RULE="Halo from:Xbox"
  • Several words can be used in the rule:
    • RULE='("Resident Evil" OR "Team Fortress" OR "Terraria" OR "Free Weekend") from:Steam'

Need help?

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].