mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
proper error
This commit is contained in:
parent
c370dac48e
commit
30d196a9cc
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,7 @@ const { createEmbed, page, formatPaginationEmbeds } = require("../../../labscore
|
||||||
const { codeblock, pill, smallIconPill } = require("../../../labscore/utils/markdown");
|
const { codeblock, pill, smallIconPill } = require("../../../labscore/utils/markdown");
|
||||||
|
|
||||||
const { Permissions } = require("detritus-client/lib/constants");
|
const { Permissions } = require("detritus-client/lib/constants");
|
||||||
|
const { editOrReply } = require("../../../labscore/utils/message");
|
||||||
|
|
||||||
const TEX_REGEX = /(\$.*?\$)/g
|
const TEX_REGEX = /(\$.*?\$)/g
|
||||||
const TEX_URL = `https://latex.codecogs.com/png.image?\\inline&space;\\huge&space;\\dpi{200}&space;\\color{white}`
|
const TEX_URL = `https://latex.codecogs.com/png.image?\\inline&space;\\huge&space;\\dpi{200}&space;\\color{white}`
|
||||||
|
@ -30,6 +31,8 @@ module.exports = {
|
||||||
|
|
||||||
let texBlocks = content.match(TEX_REGEX);
|
let texBlocks = content.match(TEX_REGEX);
|
||||||
|
|
||||||
|
if(!texBlocks) return editOrReply(context, createEmbed("warning", context, "No expressions found."))
|
||||||
|
|
||||||
let pages = [];
|
let pages = [];
|
||||||
for(const t of texBlocks){
|
for(const t of texBlocks){
|
||||||
let description;
|
let description;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue