mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
small eval fixes
This commit is contained in:
parent
6628fc3233
commit
7f614ffac1
1 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,7 @@ module.exports = {
|
|||
label: 'code',
|
||||
name: 'eval',
|
||||
metadata: {
|
||||
description: `Evaluate code snippets.\nSupported languages: ${highlight(Object.keys(REXTESTER_LANGUAGES).join(', '))}`,
|
||||
description: `Evaluate code snippets. Supports codeblocks.\n\nSupported languages: ${highlight(Object.keys(REXTESTER_LANGUAGES).join(', '))}`,
|
||||
description_short: 'Evaluate code',
|
||||
examples: ['eval console.log(\'hi\') -lang js'],
|
||||
category: 'utils',
|
||||
|
@ -26,6 +26,8 @@ module.exports = {
|
|||
run: async (context, args) => {
|
||||
context.triggerTyping();
|
||||
|
||||
if(!args.code) return editOrReply(context, createEmbed("warning", context, "No code provided."))
|
||||
|
||||
const { matches } = Utils.regex(DiscordRegexNames.TEXT_CODEBLOCK, args.code);
|
||||
|
||||
if (matches.length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue