From 1efb9540e4e66792f9c5e5e61b7bc3f6e8b42f7c Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Fri, 3 Jun 2022 15:01:29 +0200 Subject: [PATCH] general business --- .gitignore | 6 ------ labscore/utils/embed.js | 11 ++++++++++- labscore/utils/markdown.js | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index afaf03b..0000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -node_modules -package-lock.json - -# Local Development Environment Setup -.env -local.js \ No newline at end of file diff --git a/labscore/utils/embed.js b/labscore/utils/embed.js index 80e75c5..aeaf5cb 100644 --- a/labscore/utils/embed.js +++ b/labscore/utils/embed.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 } diff --git a/labscore/utils/markdown.js b/labscore/utils/markdown.js index c84f775..e896169 100644 --- a/labscore/utils/markdown.js +++ b/labscore/utils/markdown.js @@ -19,5 +19,5 @@ module.exports.link = function(url, masked){ } module.exports.timestamp = function(time, flag = "t"){ - return `<${flag}:${Math.floor(time/1000)}>` + return `` } \ No newline at end of file