A Discord bot that tracks Meesman fund prices and notifies subscribed channels when changes are detected.
- Aandelen Wereldwijd Totaal (NL0013689110)
- Aandelen Verantwoorde Toekomst (NL0015000PW1)
- Written in TypeScript, runs with Bun
- Support for multiple Meesman funds via dropdown selection
- Automatic hourly price checks on Monday and Tuesday
- Notifications when fund prices change
- Shows current price, previous price, and percentage change
- SQLite database for persistent storage
- Slash commands with fund selection dropdowns
-
Create a Discord application at https://discord.com/developers/applications
-
Create a bot for your application and copy the token
-
Enable the following in your bot settings:
applications.commandsscope (for slash commands)
-
Copy
.env.exampleto.envand fill in your values:DISCORD_TOKEN=your_bot_token_here DISCORD_CLIENT_ID=your_client_id_here -
Install dependencies:
bun install
-
Register slash commands:
bun run register
-
Start the bot:
bun start
Or with hot reload:
bun run dev
| Script | Description |
|---|---|
bun start |
Run the bot |
bun run dev |
Run with hot reload (watch mode) |
bun run register |
Register slash commands |
bun run build |
Bundle for Node.js deployment |
All commands include a fund selection dropdown to choose which fund to interact with.
| Command | Description |
|---|---|
/meesman-follow |
Subscribe current channel to price updates for a fund |
/meesman-unfollow |
Unsubscribe current channel from price updates for a fund |
/meesman-status |
Get current fund price, statistics, and check for updates |
/meesman-history |
Show recent price history for a fund |
The bot automatically checks for price updates for all supported funds every hour on Monday and Tuesday (Europe/Amsterdam timezone). This schedule aligns with when Meesman typically updates their fund prices.
All data is stored in an SQLite database at data/meesman.db:
- subscriptions: Channels that receive price update notifications
- price_history: Historical price data for tracking changes
The bot runs on Linux using screen for process management:
# Start a new screen session
screen -S meesman
# Install dependencies and start the bot
bun install && bun start
# Detach from session: Ctrl+A, then DTo reattach later:
screen -r meesmanIf it says "attached" elsewhere, force reattach:
screen -d -r meesmanAfter pulling new code, reattach to the screen session, stop the bot with Ctrl+C, then run bun install && bun start again.
Generate an invite link with the following permissions:
View ChannelsSend MessagesEmbed LinksUse Application Commands
Example invite URL format:
https://discord.com/api/oauth2/authorize?client_id=1460663524106829966&permissions=2147503104&scope=bot%20applications.commands