This project serves as a Discord bot interface for visual novel metadata that is indexed and stored by a separate Laravel application. The bot provides notifications about visual novel updates to Discord users.
The project works in conjunction with FVN.li, a Laravel application that handles the actual indexing, metadata processing, and database management.
/search- Search for visual novels by name, returns matches with version, word count, last updated, and links
The bot periodically polls the API for updates and notifies subscribed users.
docker compose up -d- Bun 1.0 or later
- Discord bot application with Message Content Intent enabled
- Access to the FVN.li API
The following environment variables must be set before starting the application:
FVN.li API Configuration:
LARAVEL_API_URL- URL of the FVN.li APILARAVEL_API_TOKEN- Your API token for accessing the FVN.li API
Discord Configuration:
DISCORD_API_KEY- Bot token from Discord Developer PortalDISCORD_ADMIN_ID- Discord user ID that receives the simple feed of every watched game update, addition request, and review reportDISCORD_ADMIN_NOTIFICATIONS_CHANNEL_ID- Optional channel ID that mirrors the admin update feed
Optional development mode:
DISCORD_DEV_MODE- Set totrueto restrict Discord deliveriesDISCORD_DEV_USER_IDS- Comma-separated Discord user IDs allowed to receive DMs in development modeDISCORD_DEV_GUILD_IDS- Comma-separated Discord guild IDs allowed to receive channel messages in development mode
In development mode, queued notifications for users outside the allowlist are reported to the API as successfully processed without contacting Discord. Addition-request and review-report notifications are likewise consumed without delivery when the configured admin is not allowlisted. Production delivery behavior is unchanged when DISCORD_DEV_MODE is unset or false.
# Clone the repository
git clone https://github.com/AkibaAT/fvn.li-discord-bot.git
cd fvn.li-discord-bot
# Install dependencies
bun install
# Start the Discord bot
bun run src/index.tssrc/
├── index.ts # Main entry point
├── config.ts # Environment configuration
├── commands/
│ ├── index.ts # Command registry
│ └── search.ts # /search command
├── events/
│ └── handlers.ts # Discord event handlers
└── services/
├── api.ts # Laravel API client
└── notifications.ts # Notification polling service
Create a new file in src/commands/ following this pattern:
import { SlashCommandBuilder } from 'discord.js';
import type { ChatInputCommandInteraction } from 'discord.js';
import type { Command } from './index.ts';
export const myCommand: Command = {
data: new SlashCommandBuilder()
.setName('mycommand')
.setDescription('Description here'),
async execute(interaction: ChatInputCommandInteraction) {
// Handle command
},
};Then register it in src/events/handlers.ts.
This bot works in conjunction with:
- FVN.li - A Laravel application that handles the indexing and metadata processing