Giter VIP home page Giter VIP logo

farcaster-keyword-bot's Introduction

Farcaster Keyword Bot

Screenshot

This Telegram bot shares the latest Farcaster posts containing a tracked keyword. It is built on top of the fantastic Searchcaster API.

Setup

a. Clone this repository.

git clone <repository-url>

b. Navigate to the project directory.

cd farcaster-keyword-bot

c. Install the required dependencies.

yarn install

d. Create a .env file in the root directory of the project and add your Telegram Bot API token and Telegram Channel ID.

TELEGRAM_API_TOKEN=your-telegram-bot-api-token
TELEGRAM_CHAT_ID=your-telegram-channel-id

To get the Telegram Bot API token, create a new bot on Telegram using @BotFather. This guide breaks down the step by step process. Make sure to also add the bot to the Telegram channel in which you want to receive the updates.

To get the Telegram Channel ID, open web.telegram.org on a desktop browser and navigate to the channel. The URL will have the following format web.telegram.org/a/#TELEGRAM_CHAT_ID.

e. Replace the keywords array in index.js with your own keywords.

const keywords = [
  'wowow',
  'stated preference',
  'revealed preference',
];

f. Adjust the checkEveryMin variable in index.js to match your cron job schedule.

const checkEveryMin = 30;

Testing the Bot

To test the bot, use the following command:

node local-test.js

The bot will now fetch recent posts from Searchcaster based on your keywords and send these posts to your Telegram channel.

Deploying the Bot

This project was set up and tested with Vercel cron jobs. It should seamlessly work with other cron services.

License

This project is open source and licensed under the MIT License.

farcaster-keyword-bot's People

Contributors

mozrt2 avatar

Stargazers

netop://ウエハ avatar pugson avatar Luís Freitas avatar  avatar okhai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.