Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aiko-chan-ai/discord-markdown
Better Markdown to text chat Discord. (ansi)
https://github.com/aiko-chan-ai/discord-markdown
color discord markdown nodejs
Last synced: 3 months ago
JSON representation
Better Markdown to text chat Discord. (ansi)
- Host: GitHub
- URL: https://github.com/aiko-chan-ai/discord-markdown
- Owner: aiko-chan-ai
- License: apache-2.0
- Created: 2022-03-31T12:00:29.000Z (almost 3 years ago)
- Default Branch: v2
- Last Pushed: 2023-03-17T05:00:47.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T07:05:29.655Z (3 months ago)
- Topics: color, discord, markdown, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/discord-bettermarkdown
- Size: 15.6 KB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discord Markdown
Better Markdown to text chat Discord.
```js
npm i discord-bettermarkdown@latest
```## Breaking changes
```diff
v1.x.x
- const BetterMarkdown = require('discord-bettermarkdown');
- const markdown = new BetterMarkdown();
- markdown.format('Hello World', 'DEFAULT', 'RED', null, true);
v2.x.x
+ const BetterMarkdown = require('discord-bettermarkdown');
+ 'Hello World'.red
```### ok it's the same way with the [colors](https://www.npmjs.com/package/colors) module
## Screenshots
## colors and styles!
### text colors
- red
- green
- yellow
- blue
- pink
- cyan
- white
- gray### background colors
- bgDarkBlue
- bgOrange
- bgMarbleBlue
- bgGreyishTurquoise
- bgGray
- bgIndigo
- bgLightGray
- bgWhite
### styles- bold
- underline
- reset## Using ?
> Patch `String`
```js
const BetterMarkdown = require('discord-bettermarkdown');
```
> Send Message (discord.js)
```js
const HelloWorld = 'Hello World'.red.bgWhite.bold.underline;
console.log(HelloWorld); // it's work!
channel.send(`\`\`\`ansi\n${HelloWorld}\`\`\``);
// Send `Hello World` with color red, background color white, bold, underline
```# [Credit: Here](https://gist.github.com/kkrypt0nn/a02506f3712ff2d1c8ca7c9e0aed7c06)