update extreme conditions icons

This commit is contained in:
bignutty 2024-08-28 20:14:28 +02:00
parent a6efe07e07
commit 61b3e760a7
2 changed files with 21 additions and 8 deletions

View file

@ -41,33 +41,33 @@ module.exports.stringwrap = function(content = "", length, newlines = true){
}
module.exports.pill = function(content = ""){
return " **` " + content.toString().replace(/\`/g, 'ˋ') + " `**"
return " **` " + content.toString().replace(/\`/g, 'ˋ') + "  `**"
}
module.exports.smallPill = function(content = ""){
return " ` " + content.toString().replace(/\`/g, 'ˋ') + " `"
return " ` " + content.toString().replace(/\`/g, 'ˋ') + " `"
}
module.exports.iconPill = function(icon, content = ""){
if(!ICONS[icon]) icon = "question"
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " **` " + content.toString().replace(/\`/g, 'ˋ') + " `**"
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + "  **` " + content.toString().replace(/\`/g, 'ˋ') + "  `**"
}
module.exports.smallIconPill = function(icon, content = ""){
if(!ICONS[icon]) icon = "question"
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " ` " + content.toString().replace(/\`/g, 'ˋ') + " `"
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + "  ` " + content.toString().replace(/\`/g, 'ˋ') + "  `"
}
module.exports.iconLinkPill = function(icon, url, content = "", tooltip = ""){
if(!ICONS[icon]) icon = "question"
if(tooltip.length) tooltip = ` '${tooltip}'`
if(content) return `${ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')} [**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url.replace(/\)/g, '\\)')}${tooltip})`
if(content) return `${ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')} [**\` ${content.toString().replace(/\`/g, 'ˋ')}  \`**](${url.replace(/\)/g, '\\)')}${tooltip})`
return url
}
module.exports.linkPill = function(url, content = "", tooltip = ""){
if(tooltip.length) tooltip = ` '${tooltip}'`
if(content) return `[**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url.replace(/\)/g, '\\)')}${tooltip})`
if(content) return `[**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url.replace(/\)/g, '\\)')}${tooltip})`
return url
}