Skip to content

henu-wang/keeprule-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeepRule Discord Bot

Investment principles bot for Discord. Get daily wisdom from Warren Buffett, Charlie Munger, and more legendary investors.

Deploy on Railway Deploy to Render

Commands

Command Description
/principle Random investment principle
/principle buffett Random Buffett principle
/principle risk Risk management principles
/quiz Investment knowledge quiz
/scorecard AAPL Buffett-style stock scorecard
/feargreed Market fear/greed sentiment advice

Setup

1. Create a Discord Bot

  1. Go to Discord Developer Portal
  2. Click New Application and name it KeepRule
  3. Go to Bot tab, click Add Bot
  4. Copy the Token (keep it secret!)
  5. Enable these Privileged Gateway Intents: none needed (we only use slash commands)
  6. Copy the Application ID from the General Information tab

2. Invite the Bot to Your Server

Replace YOUR_CLIENT_ID with your Application ID:

https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=2147485696&scope=bot%20applications.commands

Permissions included: Send Messages, Embed Links, Use Slash Commands.

3. Configure Environment

cp .env.example .env

Edit .env with your values:

  • DISCORD_TOKEN - Bot token from step 1
  • CLIENT_ID - Application ID from step 1
  • GUILD_ID - (Optional) Your test server ID for instant command registration

4. Run Locally

npm install
npm start

5. Deploy

Railway (recommended)

  1. Click the "Deploy on Railway" button above
  2. Set environment variables: DISCORD_TOKEN, CLIENT_ID
  3. Deploy

Render

  1. Click the "Deploy to Render" button above
  2. Set environment variables in the Render dashboard
  3. Deploy as a Background Worker (not a Web Service)

Docker

docker build -t keeprule-discord-bot .
docker run -d --env-file .env keeprule-discord-bot

VPS / PM2

npm install -g pm2
pm2 start bot.js --name keeprule-discord
pm2 save

Data

  • data/principles.json - 100+ investment principles from legendary investors
  • data/quiz-questions.json - 20 investment knowledge quiz questions

Powered by

KeepRule.com - Investment principles from the world's greatest investors.

License

MIT

🔗 More KeepRule Resources

Free Tools

For Developers

Learning


Built by William Wang | All Tools

About

Investment principles Discord bot - wisdom from Buffett, Munger & more. Powered by KeepRule.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors