A minimal application designed to fulfill the gaps left by the Discohook bot after the move to HTTP-only commands, encapsulating the majority of the featureset in conjunction with the main site.
I didn't want to create a tertiary portion of this application that relies on the gateway due to complications with the previous iteration. As mentioned above, most of the bot is no longer on the gateway and thusly relies very little on the type of caching that was being done by my library. Nonetheless, some offerings of this application can only be fulfilled by a gateway connected process, and I would much rather continue offering them than cut them out entirely.
I have attempted to turn this situation into an ✨ opportunity ✨ to take advantage of the niceties that come with having a gateway connection.
- Minimize CPU and RAM usage, especially considering prior caching-pain-points like guilds, channels, roles, and emojis
- Compartmentalize features and reduce downtime
- Custom status advertising helpful guides (nice-to-have)
- Selective gateway event proxy to a sibling worker instance
- Clone the repository. CD to project root. Run
yarn
/npm install
- Create your
.env
file. Specify the following variables:
DISCORD_TOKEN
- your bot token. must be the same as the one configured for your worker applicationWORKER_ORIGIN
- the origin of your worker application. your bot token is sent to this process in order to verify requests
- Run
yarn build
thenyarn start
(oryarn prod
as a shortcut)