surface app directory and support in invite

This commit is contained in:
derpystuff 2024-03-28 20:56:48 +01:00
parent 602b68ad91
commit 2198b020f1
3 changed files with 22 additions and 17 deletions

View file

@ -19,9 +19,10 @@ module.exports.codeblock = function(type, content = ""){
return "```" + type + "\n" + content.join('\n').replace(/\`/g, '`') + "\n```"
}
module.exports.link = function(url, masked, tooltip = ""){
module.exports.link = function(url, masked, tooltip = "", embed = false){
if(tooltip.length) tooltip = ` '${tooltip}'`
if(masked) return `[${masked}](<${url}>${tooltip})`
if(masked && !embed) return `[${masked}](<${url}>${tooltip})`
if(masked && embed) return `[${masked}](${url}${tooltip})`
return url
}