No description
- JavaScript 99%
- Dockerfile 1%
| .gitignore | working bot | |
| app.js | create docker config | |
| command_impls.js | implement rare boars | |
| commands.js | fact checking boar now uses advanced ai algorithms | |
| compose.yaml | god is it listening on 3001? | |
| Dockerfile | don't block | |
| LICENSE | add license | |
| message-scheduler.js | Add Buttons; Remove Unschedule Command ( #5 ) | |
| package-lock.json | Bump qs and express | |
| package.json | Bump qs and express | |
| README.md | Update README.md | |
Sily Bot
A bot that automates silliness.
How to run
- Create a new bot at https://discord.com/developers/applications/
- Set your Interactions Endpoint URL here: https://discord.com/developers/applications/<id>/information
- Clone the latest version of
sily-botwithgit clone https://codeberg.org/jjanzen/sily-bot.git - Populate your
.envfileAPP_IDandPUBLIC_KEYare found at https://discord.com/developers/applications/<id>/informationDISCORD_TOKENis found by reseting the token at https://discord.com/developers/applications/<id>/bot- TIMEZONE is base on the IANA time zone database e.g.
America/Winnipeg PORTis the port that the application should run on. This value is optional and defaults to 3000.
- Install dependencies with
npm install - Register the bot commands with
npm run register - Run the bot with
npm run start
The .env file is formatted as:
APP_ID=<APPLICATION ID>
DISCORD_TOKEN=<TOKEN>
PUBLIC_KEY=<PUBLIC KEY>
TIMEZONE=<TIMEZONE>
PORT=<PORT> # optional
Note on accessing the bot
This bot requires that there be a publicly accessible interactions endpoint URL. You're on your own for this as the setup entirely depends on your system. I run an Apache webserver that proxies requests for /sily-bot to http://127.0.0.1:3000/ with the following:
<VirtualHost *:443>
# ...
SSLProxyEngine on
<Location /sily-bot>
ProxyPass http://127.0.0.1:3000/
ProxyPassReverse http://127.0.0.1:3000/
</Location>
</VirtualHost>
Current Abilities
| Command | Description |
|---|---|
/blep |
blep. |
/catfact |
Get a fact about cats |
/factcheck |
Commune with the sacred boar at the centre of the world to check a fact |
/fomx |
Get an image of a fox |
/help |
Show a help message |
/pet |
You can pet sily-bot. |
/schedule-message <message> <cron> |
Schedule a message to be sent later. Works like Linux cron jobs in the format second minute hour day month weekday. Put the number (or name of month or weekday) in each spot. If you want it to run every second, minute, etc. instead of once when it reaches the provided number, use a * instead of a number. For instance, to run a job every minute on January 4th, you might use 0 * * 4 January *. |