[nextgen] initial cardstack work

This commit is contained in:
bignutty 2025-02-11 20:45:41 +01:00
parent 858a810e86
commit 043c65a36c
4 changed files with 367 additions and 11 deletions

View file

@ -180,9 +180,10 @@ module.exports.formatPaginationEmbeds = function(embeds){
}
// Creates a page for our paginator. simple helper so we dont have to do {embeds:[]} every time
module.exports.page = function(embed, message = {}){
module.exports.page = function(embed, message = {}, metadata = {}){
return Object.assign(message, {
embeds: [embed]
embeds: [embed],
_meta: metadata,
})
}

View file

@ -33,11 +33,10 @@ module.exports.iconAsEmojiObject = function(icon){
let i = _icon(icon);
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
id: i.replace(/<a?:[a-z0-9_]*:([0-9]*)>/g,"$1"),
name: "i",
animated: i.startsWith("<a:")
}
}
/**