This commit is contained in:
bignutty 2024-11-17 01:52:18 +01:00
parent 79b096efb4
commit fcb25fc639
7 changed files with 563 additions and 6 deletions

View file

@ -5,6 +5,19 @@ module.exports.icon = function(icon){
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')
}
module.exports.iconAsEmojiObject = function(icon){
let i;
if(!ICONS[icon]) i = ICONS.question.replace(/:[a-z1-9_]*:/, ':i:');
else i = ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:');
return {
id: i.replace(/<:[a-z0-9_]*:([0-9]*)>/g,"$1"),
name: i,
animated: false, // TODO: fix this for animated emoji if we ever need them
}
}
module.exports.weatherIcon = function(icon){
if(!ICONS["weather_" + icon]) return ICONS["calendar"].replace(/:[a-z1-9_]*:/, ':i:')
return ICONS["weather_" + icon].replace(/:[a-z1-9_]*:/, ':i:')

View file

@ -68,6 +68,10 @@ const Statics = Object.freeze({
file: "brands/googlefinance.png",
revision: 0
},
googlemaps: {
file: "brands/maps.png",
revision: 0
},
googletranslate: {
file: "brands/googletranslate.png",
revision: 0
@ -222,6 +226,7 @@ module.exports.STATICS = Object.freeze({
genius: staticAsset(Statics.brands.genius),
google: staticAsset(Statics.brands.google),
googlefinance: staticAsset(Statics.brands.googlefinance),
googlemaps: staticAsset(Statics.brands.googlemaps),
googletranslate: staticAsset(Statics.brands.googletranslate),
emojipedia: staticAsset(Statics.brands.emojipedia),
inferkit: staticAsset(Statics.brands.inferkit),