🖋️Plugins
Util
Kind: global class
.validateHex(hex) ⇒
boolean
.discordTime(time) ⇒
string
.formatTime(time) ⇒
string
.shorten(text, len) ⇒
string
.toAbbrev(num) ⇒
string
|string
.renderEmoji(ctx, msg, x, y) ⇒
Promise.<void>
.formatHex(hex, alt) ⇒
string
.invertColor(hex) ⇒
string
.getAcronym(name) ⇒
string
.getLines(params, text, ctx, maxWidth) ⇒
Array.<string>
new Util()
Canvacard Util
Util.validateHex(hex) ⇒ boolean
boolean
Validates hex
Kind: static method of Util
Util.discordTime(time) ⇒ string
string
Converts regular timestamp to discord like time
Kind: static method of Util
Util.formatTime(time) ⇒ string
string
Formats time
Kind: static method of Util
Util.shorten(text, len) ⇒ string
string
Shorten text.
Kind: static method of Util
Util.toAbbrev(num) ⇒ string
| string
string
| string
Converts numbers into units like 1K
, 1M
, 1B
etc.
Kind: static method of Util
Util.renderEmoji(ctx, msg, x, y) ⇒ Promise.<void>
Promise.<void>
Renders text with emoji
Kind: static method of Util
Util.formatHex(hex, alt) ⇒ string
string
Returns formatted hex code
Kind: static method of Util
Util.invertColor(hex) ⇒ string
string
Inverts hex color
Kind: static method of Util
Util.getAcronym(name) ⇒ string
string
Returns acronym
Kind: static method of Util
Util.getLines(params, text, ctx, maxWidth) ⇒ Array.<string>
Array.<string>
Returns array of lines
Kind: static method of Util
Last updated