A Discord props bot in ~30 lines
Published · by KashRock
The stack: discord.js for the slash command, kashrockfor the data. One command answers "what's the board on CS2 right now?" with real lines from eight books.
The bot
npm install discord.js kashrock
import { Client, GatewayIntentBits } from "discord.js"
import { KashRock } from "kashrock"
const kr = new KashRock(process.env.KASHROCK_API_KEY)
const client = new Client({ intents: [GatewayIntentBits.Guilds] })
client.on("interactionCreate", async (i) => {
if (!i.isChatInputCommand() || i.commandName !== "props") return
const sport = i.options.getString("sport") ?? "cs2"
const { props } = await kr.props(sport)
const lines = props.slice(0, 8).map(
(p) => `${p.player} — ${p.direction} ${p.line} ${p.stat_type} (${p.book})`
)
await i.reply(lines.join("\n"))
})
client.login(process.env.DISCORD_TOKEN)Register a /props command with one string option (sport: cs2, valorant, lol, dota2…) and the bot answers with live board lines — player, direction, line, stat type, book.
Take it further
- Filter one book: pass a
bookparam or filter onp.book === "prizepicks" - Cross-book compare: group offers by
propIdand post the softest line - Live scores:
kr.liveGames(sport)for a/livecommand - Results: grade the day's calls with the research board and history tape methods
Keys and limits
Free Sandbox key in the console — 1,500 credits/UTC day is plenty for a community server. When the bot grows, Hobby is $29.99/mo with 1.5M credits. SDK reference: /docs/sdk.