Low-dependency discord bot to create an opinionated experience at Keep.
Add scripts or event hooks to the /scripts/ folder. These should export an
object with two keys:
trigger, which is the Event that triggers the script.execute, which is a function that takes in aclientand returns a event handler function. For a barebones example of this, check out logged-in.js.
Add cron jobs to the /cron/ folder. These should export the following keys:
schedule, which is a cron-formatted string.timezone, which is the english-named timezone likeAmerica/New_York.execute, which is a function that takes in aclientand returns a function to be run on a cron schedule. For a simple example of this, check out clean-github-channel.js.
- Create your own bot using the the discord developer portal.
- Make sure your bot has the proper server authorizations

- Create a server, invite the bot to it, and give it a good permissions integer:
1089952280129 - Clone this repo, and set the following environment variables below. I recommend direnv to manage this.
- Navigate to this directory.
$ npm ci$ node index.js- You should be greeted with something that looks like:
Logged in as TestBishop#6775!
Successfully registered application commands.
TOKEN: The token for the discord bot from the discord API.ROLE: The role-id for @Keep. Use development mode and right-click+copy id from the settings menu.EMOJI: The id of the emoji to indicate threading. Upload an emoji and then inspect it in a web browser console. You should see something like https://cdn.discordapp.com/emojis/{EMOJI_ID}.webp?size=64&quality=losslessGUILD: The id of the server. Any link to a discord message has the following structure: https://discord.com/channels/GUID_ID/CHANNEL_ID/MESSAGE_ID.