Giter Site home page Giter Site logo

hacker-news-alert-chatgpt-discord's Introduction

Summarize Hacker News Posts Using ChatGPT -- Discord version

flows.network Discord flows.network Twitter Create a flow

Deploy this function on flows.network and receive hourly alerts with summarized Hacker News posts tailored to your interests.

image

You can also send the ChatGPT summary as a Slack Message.

How it works

This scheduled bot uses ChatGPT to summarize Hacker News posts. At the specified time, the bot searches for posts from the past hour, filters them based on your chosen keyword, and sends you a Discord message with a summary.

Deploy your own Hacker News summary bot in 3 steps

  1. Create a bot from a template
  2. Add your OpenAI API key
  3. Configure the bot on a specified Discord channel

0 Prerequisites

1 Create a bot from a template

Go to the Hacker News Alert ChatGPT Discord template.

Review the KEYWORD variable to specify your keyword of interest (supporting only one keyword for each bot).

Click on the Create and Build button.

2 Configure the bot to access Discord

Set up the Discord integration. Enter the discord_channel_id and discord_token to configure the bot. Click here to learn how to get a Discord channel id and Discord bot token.

  • discord_channel_id: Specify the channel where you want to deploy the bot. Copy and paste the final set of serial numbers from the discord channel's webpage URL.
  • discord_token: Get the Discord token from the Discord Developer Portal.
image

Click Continue.

2 Add your OpenAI API key

Set up the OpenAI integration. Click on Connect, and enter your key. The default key name is Default.

image

Close the tab and go back to the flow.network page once you are done. Finally, click Deploy.

Wait for the magic!

You are now on the flow details page and the flow function takes a few seconds to build. Once the flow's status changes to running, your bot is ready to summarize Hacker News posts.

FAQ

How to customize the bot's scheduled messaging time?

To customize the time when the bot sends Discord messages, you can modify the value in the cron expression ("37 * * * *"). This expression means the bot sends messages at the 37th minute of every hour.

    schedule_cron_job(String::from("37 * * * *"), keyword, callback).await;

To adjust the timing, you can change the number 37 to your desired minute. For example, if you want the messages to be sent at the 15th minute of every hour, you can modify the expression to be ("15 * * * *").

By customizing the cron expression, you can set the desired timing for the bot to send Discord messages.

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.