Menu

Build a Discord Sports Bot with discord.js & an API
📰

Build a Discord Sports Bot with discord.js & an API

DEV Community: node·orbistats·about 12 hours ago
#174OxCFG
#devtonodejs#devto#dev#const#sport
Reading 0:00
15s threshold

Every sports Discord server eventually asks the same question: “What matches are on today?”

In this tutorial we’ll build a Discord bot with a single, polished slash command:

/fixtures sport:cricket date:2026-11-21

It returns a clean embed of matches grouped by competition. We’ll cover:

Registering slash commands with dropdown choices for 13 sports

Calling a sports API safely from Node.js

A small TTL cache so busy servers don’t burn your quota

Rate-limit and error handling with friendly messages

Ideas for adding goal alerts with webhooks

The data comes from the Orbistats API, which covers 13 sports under one schema, so one command handles every sport.

Prerequisites

Node.js 20+ (built-in fetch)

A Discord account and a server where you can add bots

An Orbistats API key via Request Access.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.