mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
23 lines
No EOL
544 B
JavaScript
23 lines
No EOL
544 B
JavaScript
const { ICONS } = require('../constants')
|
|
|
|
module.exports.icon = function(icon){
|
|
if(!ICONS[icon]) return ICONS.question
|
|
return ICONS[icon]
|
|
}
|
|
|
|
module.exports.highlight = function(content){
|
|
return "`" + content + "`"
|
|
}
|
|
|
|
module.exports.codeblock = function(type, content){
|
|
return "```" + type + "\n" + content.join('\n') + "\n```"
|
|
}
|
|
|
|
module.exports.link = function(url, masked){
|
|
if(masked) return `[${masked}](${url})`
|
|
return url
|
|
}
|
|
|
|
module.exports.timestamp = function(time, flag = "t"){
|
|
return `<${flag}:${Math.floor(time/1000)}>`
|
|
} |