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

6
.gitignore vendored
View file

@ -1,6 +0,0 @@
node_modules
package-lock.json
# Local Development Environment Setup
.env
local.js

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
}

View file

@ -19,5 +19,5 @@ module.exports.link = function(url, masked){
}
module.exports.timestamp = function(time, flag = "t"){
return `<${flag}:${Math.floor(time/1000)}>`
return `<t:${Math.floor(time/1000)}:${flag}>`
}