mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
* feat: add @discordjs/formatters * chore: make requested changes * chore: make requested changes * chore: fix other places * chore: make requested changes Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
About
@discordjs/formatters set of functions to format strings for Discord.
Installation
Node.js 16.9.0 or newer is required.
npm install @discordjs/formatters
yarn add @discordjs/formatters
pnpm add @discordjs/formatters
Example usage
import { codeBlock } from '@discordjs/formatters';
const formattedCode = codeBlock('hello world!');
console.log(formattedCode);
// Prints:
// ```
// hello world!
// ```
Links
- Website (source)
- Documentation
- Guide (source) See also the Update Guide, including updated and removed items in the library.
- discord.js Discord server
- Discord API Discord server
- GitHub
- npm
- Related libraries
Contributing
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
documentation.
See the contribution guide if you'd like to submit a PR.
Help
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official discord.js Server.