weather v2, p2

This commit is contained in:
derpystuff 2023-10-28 13:40:38 +02:00
parent 911d28c46b
commit f0478902c5
3 changed files with 31 additions and 8 deletions

View file

@ -1,10 +1,15 @@
const { ICONS, REDESIGN_ICONS } = require('../constants')
module.exports.icon = function(icon){
if(!REDESIGN_ICONS[icon]) return ICONS.question
if(!REDESIGN_ICONS[icon]) return ICONS.question.replace(/:[a-z1-9_]*:/, ':i:')
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')
}
module.exports.weatherIcon = function(icon){
if(!REDESIGN_ICONS["weather_" + icon]) return REDESIGN_ICONS["calendar"].replace(/:[a-z1-9_]*:/, ':i:')
return REDESIGN_ICONS["weather_" + icon].replace(/:[a-z1-9_]*:/, ':i:')
}
module.exports.highlight = function(content = ""){
return "`" + content.toString().replace(/\`/g, 'ˋ') + "`"
}