mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -04:00
general business
This commit is contained in:
parent
91bd5f960c
commit
1efb9540e4
3 changed files with 11 additions and 8 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,6 +0,0 @@
|
|||
node_modules
|
||||
package-lock.json
|
||||
|
||||
# Local Development Environment Setup
|
||||
.env
|
||||
local.js
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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}>`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue