- Multi-purpose commands: Includes a variety of commands, such as /ralsei, /dice, /ralseify, /mike, /textbox, and many more viewable via commands.md.
- Basic Express Site: Runs a basic Express site alongside the bot to display basic commands, uptime, and links.
- Rotating Statuses: Features a list of rotating status messages configurable via
statuses.json - Content Filtering: Filters out potentially harmful content in commands such as /ralsei
- Ratelimits: Per-command ratelimits to prevent spam
| Command | Description |
|---|---|
/ralsei |
Fetches a random Ralsei image from Reddit or Twitter |
/ralsei-sprite |
Get a random Ralsei sprite |
/textbox |
Generate Deltarune textboxes with custom text and sprites |
/ping |
Basic responsiveness check |
/uptime |
View bot uptime statistics |
/about |
View information about the bot |
Note
More commands can be found via the discord command selector, or via commands.md
- Node.js v18 or higher
- Python 3.x (optional, used in sprite extraction)
- A Discord bot token
- A Reddit app token
-
Clone the repository
git clone https://github.com/BananaJeanss/ralseibot.git cd ralseibot -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Important
Make sure to edit .env with your Discord bot token and client ID, and Reddit app client ID and secret, otherwise the bot won't work.
-
Extract sprites (optional for /ralsei-sprite)
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r static/sprites/requirements.txt npm run extract-sprites
-
Build and deploy commands
npm run build npm run deploy-commands
-
Start the bot
npm start
# Required
DISCORD_BOT_TOKEN=your_bot_token_here
DISCORD_CLIENT_ID=your_client_id_here
# Required for Reddit handler to work (/ralsei)
REDDIT_CLIENT_ID=
REDDIT_CLIENT_SECRET=
# Optional, but recommended that you set these.
RUN_MODE=dual # bot, site, or dual
EXPRESS_PORT=3000You can configure content sources in sources.yaml, make sure a handler exists for it in the handlers/ folder.
sources:
reddit:
- name: "r/ralsei"
url: "/r/ralsei/"
weight: 5
twitter:
- name: "Bi-Hourly Ralsei"
url: "https://x.com/bihourlyralsei"
weight: 5/radio plays songs from the radio/songs/ folder in a voice channel. You can add your own songs in mp3 format to this folder, and they will be picked randomly when the command is used.
npm run dev- Starts a development server with hot reload using tsxnpm run build- Builds TypeScript to JavaScript todist/npm run deploy-commands- Deploys commands indist/to your Discord bot (required for commands to be accessible)npm run copy-static- Copies over static files (such as html, sprites, etc) to dist/ foldernpm run lint- Runs ESLint (current config may be broken, use with caution)
src/
├── commands/ # Discord slash commands
│ ├── ralsei/ # General/Ralsei commands
│ └── utility/ # Utility commands
├── events/ # General event handlers
├── handlers/ # Content source handlers (e.g. Reddit, Twitter)
├── site/ # Express site
└── index.ts # Main entry point
Contributions are welcome! Please feel free to:
- Report bugs by opening an issue
- Suggest features via the feature request template
- Submit pull requests for improvements
Make sure your contribution follows the general guidelines, and if you're opening a pull request, that it isn't being worked on by someone else already.
For more information, read the CONTRIBUTING.md file.
This project is licensed under the MIT License, see the LICENSE file for details.
- Sprites: Extracted from Deltarune spritesheets via Spriters Resource
- Hero Banner: @morxwx on Twitter
- Quotes: HushBugger/hushbugger.github.io for in-game quotes/text dump
Made for https://converge.hackclub.com/
