Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@discordjs/formatters

Package Overview
Dependencies
Maintainers
2
Versions
793
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@discordjs/formatters

A set of functions to format strings for Discord.

  • 0.6.0-dev.1730981090-c97310681
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
170K
increased by2.47%
Maintainers
2
Weekly downloads
 
Created

What is @discordjs/formatters?

@discordjs/formatters is a utility package designed to help format messages and other content for Discord bots. It provides a set of functions to easily format text in a way that is compatible with Discord's markdown and other formatting features.

What are @discordjs/formatters's main functionalities?

Code Block Formatting

This feature allows you to format text as a code block in Discord. The `codeBlock` function takes two arguments: the language for syntax highlighting and the code itself.

const { codeBlock } = require('@discordjs/formatters');
const formattedCode = codeBlock('js', 'const x = 10;');
console.log(formattedCode);

Inline Code Formatting

This feature allows you to format text as inline code in Discord. The `inlineCode` function takes a single argument: the code to be formatted.

const { inlineCode } = require('@discordjs/formatters');
const formattedInlineCode = inlineCode('const x = 10;');
console.log(formattedInlineCode);

Quote Formatting

This feature allows you to format text as a quote in Discord. The `quote` function takes a single argument: the text to be quoted.

const { quote } = require('@discordjs/formatters');
const formattedQuote = quote('This is a quoted text.');
console.log(formattedQuote);

Bold Text Formatting

This feature allows you to format text as bold in Discord. The `bold` function takes a single argument: the text to be formatted in bold.

const { bold } = require('@discordjs/formatters');
const formattedBoldText = bold('This is bold text.');
console.log(formattedBoldText);

Italic Text Formatting

This feature allows you to format text as italic in Discord. The `italic` function takes a single argument: the text to be formatted in italic.

const { italic } = require('@discordjs/formatters');
const formattedItalicText = italic('This is italic text.');
console.log(formattedItalicText);

Other packages similar to @discordjs/formatters

FAQs

Package last updated on 07 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc