Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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)

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)