Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
/ goose Public archive

Discord bot that announces new items on RSS feeds 🪿 *honk!*

License

Notifications You must be signed in to change notification settings

connorkuehl/goose

Repository files navigation

Goose

Discord bot that announces new items on RSS feeds 🪿 honk!

⚠️ Not appropriate for production use ⚠️

This application is not designed to scale horizontally:

  • Discord bot sharding is not implemented.
  • Notification persisted state is stored in a table and not a queue, so if there was another goose process running there's a big chance they would race and potentially duplicate notifications.

Usage

When goose is first added to the server, it will install the following slash commands such that only the server administrator may invoke them.

The server administrator can add overrides in the server settings to allow individual members or members with a given role access to the slash commands.

Command Arguments Description
/subscribe channel, URL to feed, collection name Subscribes the server to the feed at the given URL identified by the given collection name. New items are announced on the supplied channel.
/unsubscribe collection name Unsubscribes the server from the feed identified by collection name.
/test collection name Emits the last published item on the feed identified by collection name.

Outside of that, goose will automatically announce new items on feeds that the server is subscribed to.

Usage screencast

Building

Prerequisites:

  1. A Go toolchain

Simply run go build.

Running

Prerequisites:

  1. Valid Discord bot token with the "bot" and "applications.commands" scopes
  2. PostgreSQL database
  3. goose binary (see "Building")
  4. migrate

Once you have a valid Postgres DSN, make sure you run the migrations with migrate so that all of the tables are set up:

$ migrate -database=$GOOSE_POSTGRES_DSN -path ./migrations/postgres up

goose needs to be configured to use the Discord token and a valid Postgres DSN. You can supply these at the command line:

$ goose -discord-token <SECRET_BOT_DISCORD_TOKEN> \
        -postgres-dsn <SECRET_POSTGRES_DSN>

Or you can supply them as environment variables. These override any values set at the command line:

$ export GOOSE_DISCORD_TOKEN="SECRET_BOT_DISCORD_TOKEN"
$ export GOOSE_POSTGRES_DSN="postgres://goose:goose@localhost:55432/goose?sslmode=disable"
$ goose

About

Discord bot that announces new items on RSS feeds 🪿 *honk!*

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published