# @sapphire/discord-utilities

> Discord specific utilities for your JavaScript/TypeScript bots

Latest version **4.0.0** (published 2025-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sapphire/discord-utilities
pnpm add @sapphire/discord-utilities
yarn add @sapphire/discord-utilities
bun add @sapphire/discord-utilities
```

## Health

**Score 70/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2025-11-08 |
| First published | 2020-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=v14.0.0 |
| Dependencies | 1 |
| Unpacked size | 882.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 191 |
| Author | @sapphire |
| Maintainers | favna, vladfrangu, kyranet |
| Keywords | @sapphire/discord-utilities, bot, typescript, ts, yarn, discord, sapphire, standalone |

## Links

- npm: https://www.npmjs.com/package/@sapphire/discord-utilities
- Repository: https://github.com/sapphiredev/utilities
- Homepage: https://github.com/sapphiredev/utilities/tree/main/packages/discord-utilities
- Issues: https://github.com/sapphiredev/utilities/issues
- npm.io page: https://npm.io/package/@sapphire/discord-utilities

## Dependencies (1)

- [discord-api-types](https://npm.io/package/discord-api-types.md) ^0.38.30

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2025-11-08
- 4.1.0-next.c1299bac (next) — 2026-03-08
- 4.0.0-pr-935.7da5c8bb (pr-935) — 2025-11-25
- 3.2.4-pr-725.55b1ff7b.0 (pr-725) — 2024-03-17
- 3.2.2-pr-684.9d7e2fce.0 (pr-684) — 2023-12-14
- 4.0.0-pr-601.2f2c308a.0 (pr-601) — 2023-05-28
- 4.0.0-pr-589.aa473f9.0 (pr-589) — 2023-05-04
- 4.0.0-pr-587.e9607661.0 (pr-587) — 2023-05-04
- 4.0.0-pr-584.b444d5b.0 (pr-584) — 2023-05-02
- 3.0.3-pr-575.91d23d87.0 (pr-575) — 2023-04-16
- 3.0.2-pr-567.8638d898.0 (pr-567) — 2023-04-06
- 2.13.0-pr-434.77ef153.0 (pr-434) — 2023-01-06
- 2.7.0-pr-270.b2c4518.0 (pr-270) — 2022-01-26
- 4.1.0-next.74a2fafa — 2026-03-01
- 4.1.0-next.88f09754 — 2026-02-22
- … 1058 more at https://npm.io/package/@sapphire/discord-utilities/versions

## README

<div align="center">

![Sapphire Logo](https://raw.githubusercontent.com/sapphiredev/assets/main/banners/SapphireCommunity.png)

# @sapphire/discord-utilities

**Discord specific utilities for your JavaScript/TypeScript bots.**

[![GitHub](https://img.shields.io/github/license/sapphiredev/utilities)](https://github.com/sapphiredev/utilities/blob/main/LICENSE.md)
[![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/discord-utilities?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@sapphire/discord-utilities)
[![npm](https://img.shields.io/npm/v/@sapphire/discord-utilities?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/discord-utilities)

</div>

## Description

When developing Discord bots or frameworks for Discord bots we often run into certain constants such as regex's, channel type resolutions and other common functions that would be really nice to get from 1 centralized place. That's where @sapphire/discord-utilities come in. This package provides common Discord specific utilities for your Discord bots.

**Important**: If you're looking for [Discord.js] specific utilities then install [@sapphire/discord.js-utilities] instead. [@sapphire/discord.js-utilities] re-exports this package at the root level and peer-depends on this package.

## Features

-   Written in TypeScript
-   Bundled with esbuild so it can be used in NodeJS and browsers
-   Offers CommonJS, ESM and UMD bundles
-   Fully tested
-   Discord library agnostic

## Installation

You can use the following command to install this package, or replace `npm install` with your package manager of choice.

```sh
npm install @sapphire/discord-utilities
```

---

## Buy us some doughnuts

Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!

We accept donations through Open Collective, Ko-fi, Paypal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.

|   Donate With   |                       Address                       |
| :-------------: | :-------------------------------------------------: |
| Open Collective | [Click Here](https://sapphirejs.dev/opencollective) |
|      Ko-fi      |      [Click Here](https://sapphirejs.dev/kofi)      |
|     Patreon     |    [Click Here](https://sapphirejs.dev/patreon)     |
|     PayPal      |     [Click Here](https://sapphirejs.dev/paypal)     |

## Contributors

Please make sure to read the [Contributing Guide][contributing] before making a pull request.

Thank you to all the people who already contributed to Sapphire!

<a href="https://github.com/sapphiredev/utilities/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=sapphiredev/utilities" />
</a>

[contributing]: https://github.com/sapphiredev/.github/blob/main/.github/CONTRIBUTING.md
[@sapphire/discord.js-utilities]: https://www.npmjs.com/package/@sapphire/discord.js-utilities
[discord.js]: https://discord.js.org

---
_Source: https://npm.io/package/@sapphire/discord-utilities · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
