GrafixersCrew WhatsApp us

Home › Discord Bots › discord.js

What is discord.js? The powerful JavaScript library for interacting with the Discord API

discord.js is a powerful Node.js module that lets you easily interact with the Discord API. It is the library behind a huge share of the Discord bots running today — from moderation and welcome bots to music, games and community tools.

discord.js in one paragraph

discord.js (github.com/discordjs/discord.js) is a powerful Node.js module that allows you to easily interact with the Discord API. The repository is a monorepo containing multiple packages with separate releases: the assembled Discord API wrapper at discord.js itself, plus a set of focused packages around it. It is the standard way to build a Discord bot in JavaScript or TypeScript, with an official website, documentation, a step-by-step guide, and a large Discord server for help.

discord.js was created in August 2015 and passed 26,000 GitHub stars by December 2026, with its most recent push in December 2026. It is released under the Apache 2.0 licence. The project is actively maintained, with tests, code coverage and a long contributor list, and it is funded in part through Open Collective backers.

What discord.js actually does

discord.js wraps the Discord API so your bot code reads like your bot’s behaviour, not like raw HTTP and websockets. Its work breaks down into four parts.

1. The bot library itself

The discord.js package is a powerful Node.js module for interacting with the Discord API: it handles connecting to Discord, receiving events like messages and member joins, and sending replies, embeds, buttons and slash-command responses. You write the bot’s behaviour in JavaScript or TypeScript, and the library handles the API underneath.

2. A toolkit of focused packages

Around the core library sits a set of packages you can use together or on their own: create-discord-bot, a CLI tool to quickly scaffold a Discord bot project; @discordjs/builders for building Discord API payloads; @discordjs/collection, a powerful utility data structure; @discordjs/formatters for formatting strings; @discordjs/rest for the REST API; @discordjs/voice for the Discord Voice API; @discordjs/ws as a wrapper around Discord’s gateway; and @discordjs/core, a thinly abstracted wrapper around the core components of the API, plus utilities, structures, RPC and a proxy package.

3. Docs, a guide and a community to learn from

The project’s documentation lives on its website, with a full guide at discordjs.guide — including an update guide for moving from v13 to v14 — and a Discord server where you can ask questions. Contributions of all kinds are welcomed, and issues labelled good first issue mark easy starting points for new contributors.

4. Voice, and the pieces around a real bot

Voice support is a first-class part of the project through the @discordjs/voice package, so a bot can join voice channels and play audio. There is also a lightweight HTTP proxy for Discord’s API as a container, for bots that need to route their API traffic through one place.

What it costs

discord.js itself is free — Apache 2.0, no subscription, no per-bot fee. The cost that can appear is the one you choose: a bot has to run somewhere, so you need somewhere to host the Node.js process and keep it online, and that hosting is yours to arrange and pay for. The library, the docs, the guide and the community help are all free.

Who discord.js is for

Discord server owners

You run a gaming community and want a bot of your own — moderation, welcome messages, roles, games or music — built the way you want it, not rented from a bot list.

JavaScript and TypeScript developers

You already write Node.js. discord.js is the standard library for the job, with types, docs and a guide, and a CLI to scaffold a new bot project in minutes.

Community managers

You need a bot that fits your server’s exact rules and routines. With discord.js you can build exactly that, instead of bending a generic bot to fit.

Developers learning the Discord API

You want to understand how Discord bots work under the hood. The guide, the docs and the focused packages let you learn piece by piece, from a simple reply bot to voice and gateways.

discord.js at a glance

Honest limits

discord.js is a library, not a hosted bot: you write the bot code yourself, you host the Node.js process, and you keep it online — if your hosting goes down, your bot goes down with it. Discord’s API also changes over time, so a bot written against an older version needs updating when the library moves on (the project publishes update guides for that). And voice is a separate package with its own setup, so a music or voice bot is more work than a text-only one. What you get for that effort is a bot that is entirely yours, with no monthly bot subscription and no feature locked behind a paywall.

Want a Discord bot without doing the setup?

discord.js is the library behind our Discord bot service: we build your bot with discord.js instead of from scratch, test it by hand on a real server, and hand over a working bot with its source code. Bots from £149, with packages at £349 and £599. You bring the idea; there are no surprise bills.

Have a game idea?

Tell us the idea — a sentence is enough. We will tell you what it takes and what it costs, honestly.