general business

This commit is contained in:
derpystuff 2022-06-03 15:01:29 +02:00
parent 91bd5f960c
commit 1efb9540e4
3 changed files with 11 additions and 8 deletions

View file

@ -39,6 +39,15 @@ const embedTypes = Object.freeze({
},
color: COLORS.nsfw
}
},
"loading": (context) => {
return {
author: {
iconUrl: `https://derpystuff.gitlab.io/webstorage4/v2/assets/icons/ico_loading_small.gif`,
name: `Loading`
},
color: COLORS.embed
}
}
})
@ -47,7 +56,7 @@ module.exports.createEmbed = function(type, context, content){
if(!embedTypes[type]) throw "Invalid Embed Type"
if(!content) embedTypes[type](context)
let emb = embedTypes[type](context)
if(["warning","error"].includes(type)){
if(["warning","error","loading"].includes(type)){
emb.author.name = content
return emb
}