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 book param or filter on p.book === "prizepicks"
  • Cross-book compare: group offers by propId and post the softest line
  • Live scores: kr.liveGames(sport) for a /live command
  • 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.

Frequently asked questions

How do I add esports props to a Discord bot?

Register a slash command with discord.js, call the KashRock API inside the handler, and reply with the prop card — player, stat, line, book. The full handler is under 30 lines.

What can the bot serve?

Live DFS props from PrizePicks, Underdog, Sleeper, Betr and four more books; consensus lines; live match scores; and graded results — one API key covers all of it.

Is there a free tier for bot usage?

Yes. Sandbox is $0 with 1,500 credits per UTC day — enough for a community server polling a few times an hour. Paid plans start at $29.99/mo for heavier polls.