Bot who update banner and location every 60 sec depending on the number of followers 🤖

Overview

🤖 Twitter Bot Header

banner

How to setup for your Twitter

Add a '.env' file and insert these lines:

API_KEY='' # API key
API_SECRET='' # API key secret
ACCESS_TOKEN='' # Access token
ACCESS_SECRET='' # Access token secret
SCREEN_NAME='' # Twitter handle (without the @ character)

To get the API keys, you need to apply for a Twitter Developer account.
It's free and take ~5 minutes.

Lastly, add a banner template file with this specific name : twitter-banner.png. (make sure your file is a png image and have a size of 1500x500px)

Run the script

Install dependencies:

yarn

or

npm install

Start the app:

node index.js

Keep it running with a process manager like pm2 and have fun!

How the script works

French Tutorial here.

The script fetches new replies every 60 seconds (to avoid rate limit).

Development guidelines

Eslint & Prettier have been configured on this repository. Don't forget to run them before each commit (or after a pull-request is rebased onto the latest commit of the main branch).

How to reformat with both eslint and prettier?

npm run lint:fix

How to run eslint?

npm run lint

Most importantly

Follow me on Twitter! @guillaume_rygn

Thanks!

Comments
  • Set up continuous integration pipeline 🛠

    Set up continuous integration pipeline 🛠

    At the moment, the application is not blessed with automated testing, yet.

    A pull-request altering the core logic quite a bit has been merged already, and another with less to worry about (thanks to third-party tools robustness like prettier and eslint) are pending at the moment.

    However, we might want to change this state for the best by putting together a continuous integration pipeline. Perhaps, GitHub actions would be enough here.

    As a result, there are few options

    We could take the opportunity offered by @TheGuit with https://github.com/guillaume-rygn/Twitter-header-bot/pull/8 to go one step further and having basic tests running, hence preventing dreaded regressions.

    To begin with, I'd suggest that a single test run would be enough only for ensuring workflows or builds to be triggered on pull-request creation

    feedback 
    opened by thierrymarianne 3
  • Apply modifications to README.md 📃

    Apply modifications to README.md 📃

    Hey @guillaume-rygn,

    Awesome share! Thanks 🙏🏼!

    Please let me know if you'd rather have some of this pull-request modifications merged, removed or altered.

    opened by thierrymarianne 3
  • Fix docker build

    Fix docker build

    Hello,

    I add a dockerignore file. To be sure we don't send to docker's context all data in current folder (.git folder, current node_modules folder).

    It reduce amount of data sent from 32 MB to 290kB.

    Then I ensure that we don't do any magic operation during node modules installation.

    Using npm ci is mandatory on those context because we don't want to have a magic resolution of dependency. We want to stick to exact version listed in package-lock.json file.

    For example it will not install a newer version, remember all that compromised dependency ...

    To response to other topic listed here : https://github.com/guillaume-rygn/Twitter-header-bot/pull/8#issuecomment-1222470639

    This Dockerfile should be made with the state of art and do not provide any way of testing if the repository is inconsistent. T hoses topics should be addressed by adding à CI pipeline like mentioned in https://github.com/guillaume-rygn/Twitter-header-bot/issues/11 . All commit need also to be consistent and all commit must build.

    opened by TheGuit 1
  • Add documentation to the project 📃

    Add documentation to the project 📃

    There are different kinds of documentation starting to emerge for

    • configuration
      • there is a Makefile ready to be put to good use maybe?
      • the .env file to be created is in the README.md at the moment
    • installation (pretty much straightforward for some not that obvious nonetheless)
    • deployment (in notion) as far as I know

    Perhaps we could

    • [ ] Create a directory with separate files(?) or is it too early and
    • [ ] The README.md will be totally enough for a while(?)

    There is also the matter of automating as much as possible chunks of documentation for which copy-paste might be replaced with

    • [ ] a Makefile target (configuration example) or
    • [ ] a npm run scripts (examples provided by @TheGuit) for linting for example

    Two additional questions for you, @guillaume-rygn

    Thanks!

    documentation 
    opened by thierrymarianne 1
  • Configure Twitter header bot before run 🏃🏼

    Configure Twitter header bot before run 🏃🏼

    The possibility of a Makefile introduction has been suggested with https://github.com/guillaume-rygn/Twitter-header-bot/pull/6

    However, it brings some complication with an additional scripting language that is to say bash "only" for creating a .env file. In my experience, not having to copy-paste snippets of code usually help with automation.

    Still, introducing a Makefile with two targets might be a little too early, too overkill for

    make help
    
    • [configuration] the Twitter header bot by running
    make configure 
    

    Besides it brings a dependency on GNU Make

    There are also Pros, it will provide users with a standard entrypoint for

    • configuring the project
    • accessing the help manual
    • running the bot
    • running future test or continuous integration workflow step

    I also imagine npm scripts could be put to good use here with these exact same goals in mind as well.

    I guess, the decision is your hands @guillaume-rygn :

    • [ ] Sticking with npm run and the likes
    • [x] Introducing a somewhat more general tool like Makefile with phony targets
    infra-as-code 
    opened by thierrymarianne 1
  • Add Makefile to

    Add Makefile to "ease" (could also hear to complicate a bit 🤷🏼) configuration

    It would allow one to create the .env file by running the following command (after filling in the blanks, of course 😅)

    API_KEY= \
    API_SECRET= \
    ACCESS_TOKEN= \
    ACCESS_SECRET= \
    SCREEN_NAME='revue_2_presse' \
    make configure
    
    infra-as-code 
    opened by thierrymarianne 1
  • :rocket: Deploying Dockerfile

    :rocket: Deploying Dockerfile

    Adding dockerfile to run this on docker container

    1. Build image using : docker buid -t twitter-banner-bot . in folder that contains Dockerfile
    2. Run image using : docker run --name twitter-banner-bot -e API_KEY="" -e API_SECRET="" -e ACCESS_TOKEN="" -e ACCESS_SECRET="" -e SCREEN_NAME="" twitter-banner-bot

    This should works, let me know if everything seem okay.

    You can also build this containers and push into github docker registry

    opened by Zerka30 1
  • refactor location part of the get_followers function

    refactor location part of the get_followers function

    Petit refactor de la fonction qui mettait à jour la location avec le nombre de followers, parce que tous ces if/else me donnaient envie de me tirer une balle 😅

    opened by Beygs 0
Owner
Guillaume REYGNER
🧑‍🎓 Student - The Hacking Project
Guillaume REYGNER
The code for the LOL Banner discord bot, a bot that bans anyone for playing league of legends.

LOL-Banner.js The code for the LOL Banner discord bot, a bot that bans anyone for playing League Of Legends. This project was made based off of the me

M'et 17 Aug 2, 2022
Discord-Bot - You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have published on my youtube channel.

Discord-Bot You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have publishe

Umut Bayraktar 114 Jan 3, 2023
A multipurpose bot, a clan bot, a all in one bot. The one bot u need for ur server originally made as Milrato discord Bot and by Tomato6966.

Public Bot and Support Server! Invite the Public Version of this Bot so you don't need to host it by yourself or join my Discord server to get a custo

Tomato6966 472 Dec 25, 2022
🤖 NODE.TS - Play a welcome sound every time someone joins the voice channel, meme bot. (Olha ele ae)

welcome2voice-bot ?? NODE.TS - Play a welcome sound every time someone joins the voice channel. ?? INVITE-ME ?? Installation Clone project git clone g

Bruno Silva 5 Feb 23, 2022
This Is A Simple WhatsApp Bot Mode From *DhaniGans* Repo Hope you guys Will like it Repo Updates in Every Two Days

ALIEN ALFA BOT Contact Me: Scan QR Code For Session FORK THIS BEFORE PROCEEDING Use This Button To Fork Now THINGS TO CHANGE IN HEROKU ???????????? ??

TOXIC ALIEN 15 Dec 21, 2022
New base bot WhatsApp 🈴 bukan self bot lagi atau buka bot yang bisa di pakai oleh bot sendiri 😎

Installation • Thanks to • Donate Official Group Bot • Settings Instalasi Heroku Buildpack Click the deploy icon below ! > heroku/nodejs > https://g

zeeone 27 Feb 9, 2022
whatsapp api to remote your whatsapp device. Support multi device, multi client. Still update to more feature. Please fork, star, donate and share.

Ndalu-wa-client DEPENDENCIES : { "@adiwajshing/baileys": "^4.2.0", "@adiwajshing/keyed-db": "^0.2.4", "axios": "^0.27.2", "body-parser

null 29 Jan 4, 2023
The game we're working on every Tuesday at 6pm at http://twitch.tv/jutanium

Usage Those templates dependencies are maintained via pnpm via pnpm up -Lri. This is the reason you see a pnpm-lock.yaml. That being said, any package

Dan Jutan 7 Dec 8, 2022
GitHub action to update your discord status in a file using Lanyard API.

Discord Status Action This action fetches the status of a given user and updates that on a file. - Online - Idle - Do not disturb - Streaming - Offlin

Compey 11 Dec 15, 2022
It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with buttons. It can play youtube songs, playlists. This bot code was made by Supreme#2401. It uses djs V12

Lofi-Radio-Music-Bot It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with butt

Diwas Atreya 89 Jan 2, 2023
Ini Adalah Tools Bot WhatsApp,Pengodean Ulang Dari Sc Bot Kanna Bot

Node Modules Belum Selesai Unduh File Bot Lengkap Node Modules Click Here Lord Bot FOR DEPLOY HEROKU USER Instal Buildpack heroku/nodejs https://githu

Creator Lord-Botz 8 Jul 1, 2022
This bot can raise your mood. This bot send joke often our channel for users. Sometimes bot don't work because we have not server for this project...)

Hi, welcome to send-joke-bot telegram bot project ?? What can do this bot ? This bot can raise your mood. This bot send joke often our channel for use

Muhammadamin 5 Sep 26, 2022
A bot Similar to the reaction roles discord bot, but free. Written in JavaScript, and uses MongoDB.

Discord Reaction Roles bot About • Features • Installation • Setting Up About An open source reaction roles bot to anyone who needs one in their serve

null 52 Dec 22, 2022
Gitlift Discord Bot is a discord bot which is listening Discord Messages to reply with user gitlift profile and total contributions.

Remoklify - Gitlift Discord Bot Gitlift Discord Bot is a discord bot which is listening Discord Messages to reply with user gitlift profile and total

Remoklify 3 Mar 20, 2022
Vio-MD is multi-device whatsapp bot using library @adiwajshing/baileys and example bot of Violetics API

Vio Multi Device WhatsApp Bot Use at your own risk! Build with Baileys and JavaScript's native Map class ( as a command handler ), using https://viole

Violetics 4 May 31, 2022
Pre-Configured list of Templates and Approval/Denial Reasons that is free for any Bot List or Bot List Staff to use!

Infinity Cheat Sheet Pre-Configured list of templates that any Bot List or Bot List Staff are free to use! Website Preview Contributing I tried to mak

InfinityBotList 5 Jul 28, 2022
This project was created to help discord.js developers start their own bot, you can take this project as a basic for your bot and add things to it as you want. 🙂

Discord.js Starter-Bot A small & basic discord.js bot to help you get started ??️ This project was created to help discord.js developers start their o

Strike 3 Nov 29, 2022
Açık kaynaklı bir discord bot list botu. Bot list sunucularına özel yapılmıştır. Tanıtım videosu MoTion42 Kanalında bulunuyor. Umarım beğenirsiniz.

?? Bot Bilgilendirme Açık kaynaklı bir discord bot list botu. Bot list sunucularına özel yapılmıştır. Tanıtım videosu MoTion42 Kanalında bulunuyor. Um

`Motion 1 Sep 11, 2021
Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram.

Unimore-Bot Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram I

Lorenzo Codeluppi 8 Jun 9, 2022