From ab210ad08d8f3599a4bc763b11929bb0123287e7 Mon Sep 17 00:00:00 2001 From: Manuel Date: Mon, 10 May 2021 14:00:29 +0200 Subject: [PATCH] Initial changes for customized use --- src/commands/about.js | 5 +---- src/commands/help.js | 4 ++-- src/commands/languages.js | 2 +- src/index.js | 4 ++-- src/listeners/messageInvalid.js | 4 ++-- src/struct/Myriad.js | 7 ++++++- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/commands/about.js b/src/commands/about.js index 790e3db..bd5e052 100644 --- a/src/commands/about.js +++ b/src/commands/about.js @@ -11,10 +11,7 @@ class AboutCommand extends Command { exec(message) { return message.util.send([ - 'Comp_iler is made by 1Computer.', - 'Source code is available at .', - '', - 'Comp_iler runs on Myriad, a Docker-based arbitrary code evaluation server!', + 'Compiler runs on Myriad, a Docker-based arbitrary code evaluation server!', 'Check it out here .', '', `**Guilds**: ${this.client.guilds.cache.size}`, diff --git a/src/commands/help.js b/src/commands/help.js index c10854f..e8e7bc4 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -13,9 +13,9 @@ class HelpCommand extends Command { return message.util.send([ '**Usage:**', `Put a \`${codePrefix}\` before a code block or inline codeblock that starts with a language code to execute it.`, - `For list of enabled languages, use the \`${prefix}languages\` command.`, + `For list of enabled languages, use the \`${prefix} languages\` command.`, '', - 'See the readme for usage examples and supported languages: ' + 'For usage examples and supported languages, see: ' ]); } } diff --git a/src/commands/languages.js b/src/commands/languages.js index ba929f9..0caa2a4 100644 --- a/src/commands/languages.js +++ b/src/commands/languages.js @@ -15,7 +15,7 @@ class LanguagesCommand extends Command { '**List of enabled languages (Language Codes)**:', ...languages.map(lang => `\`${Myriad.Languages.get(lang).join('`, `')}\``), '', - 'See the readme for usage examples: ' + 'For usage examples, see: ' ]); } } diff --git a/src/index.js b/src/index.js index 49ebdec..320c1c7 100644 --- a/src/index.js +++ b/src/index.js @@ -4,12 +4,12 @@ const client = new CompilerClient(config); client.once('ready', () => { // eslint-disable-next-line no-console - console.log('[Info] Comp_iler ready to go!'); + console.log('[Info] Compiler ready to go!'); }); client.on('ready', () => { client.user.setPresence({ - activity: { name: '@Comp_iler help' }, + activity: { name: `${config.prefix} help` }, status: 'online' }); }); diff --git a/src/listeners/messageInvalid.js b/src/listeners/messageInvalid.js index a84eb3b..d441cfa 100644 --- a/src/listeners/messageInvalid.js +++ b/src/listeners/messageInvalid.js @@ -52,11 +52,11 @@ class MessageInvalidListener extends Listener { const output = `\`\`\`\n${response}\n\`\`\``; if (output.length >= 2000) { - const key = await fetch('https://hasteb.in/documents', { method: 'POST', body: response }) + const key = await fetch('https://haste.snrd.de/documents', { method: 'POST', body: response }) .then(res => res.json()) .then(json => json.key); - return message.util.send(`Output was too long: `); + return message.util.send(`Output was too long: `); } return message.util.send(output); diff --git a/src/struct/Myriad.js b/src/struct/Myriad.js index 5259ea4..c9ec3fe 100644 --- a/src/struct/Myriad.js +++ b/src/struct/Myriad.js @@ -6,7 +6,7 @@ class Myriad { } url(k) { - return `http://localhost:${this.port}/${k}`; + return `http://127.0.0.1:${this.port}/${k}`; } getLanguages() { @@ -53,13 +53,16 @@ class Myriad { const entries = [ ['apl', ['apl']], + ['arnoldc', ['arnoldc', 'arnold']], ['bash', ['bash', 'sh']], ['brainfuck', ['brainfuck', 'bf']], ['c', ['c']], ['cpp', ['cpp']], ['csharp', ['csharp', 'cs']], ['elixir', ['elixir']], + ['emojicode', ['emojicode', 'emojic', '😂']], ['erlang', ['erlang', 'erl']], + ['d', ['dlang', 'd']], ['fsharp', ['fsharp', 'fs']], ['go', ['golang', 'go']], ['haskell', ['haskell', 'hs']], @@ -68,6 +71,7 @@ const entries = [ ['javascript', ['javascript', 'js']], ['julia', ['julia']], ['lua', ['lua']], + ['lolcode', ['lolcode', 'lol']], ['nim', ['nim', 'nimrod']], ['ocaml', ['ocaml', 'ml']], ['pascal', ['pascal', 'pas', 'freepascal']], @@ -79,6 +83,7 @@ const entries = [ ['racket', ['lisp']], ['ruby', ['ruby', 'rb']], ['rust', ['rust', 'rs']], + ['setlx', ['setlx', 'stlx']], ['typescript', ['typescript', 'ts']] ];