Initial changes for customized use

This commit is contained in:
Manuel 2021-05-10 14:00:29 +02:00
parent f207e5ccb4
commit ab210ad08d
Signed by: Manuel
GPG key ID: 4085037435E1F07A
6 changed files with 14 additions and 12 deletions

View file

@ -11,10 +11,7 @@ class AboutCommand extends Command {
exec(message) { exec(message) {
return message.util.send([ return message.util.send([
'Comp_iler is made by 1Computer.', 'Compiler runs on Myriad, a Docker-based arbitrary code evaluation server!',
'Source code is available at <https://github.com/1Computer1/comp_iler>.',
'',
'Comp_iler runs on Myriad, a Docker-based arbitrary code evaluation server!',
'Check it out here <https://github.com/1Computer1/myriad>.', 'Check it out here <https://github.com/1Computer1/myriad>.',
'', '',
`**Guilds**: ${this.client.guilds.cache.size}`, `**Guilds**: ${this.client.guilds.cache.size}`,

View file

@ -15,7 +15,7 @@ class HelpCommand extends Command {
`Put a \`${codePrefix}\` before a code block or inline codeblock that starts with a language code to execute it.`, `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: <https://github.com/1Computer1/comp_iler>' 'For usage examples and supported languages, see: <https://haste.snrd.de/compiler.md>'
]); ]);
} }
} }

View file

@ -15,7 +15,7 @@ class LanguagesCommand extends Command {
'**List of enabled languages (Language Codes)**:', '**List of enabled languages (Language Codes)**:',
...languages.map(lang => `\`${Myriad.Languages.get(lang).join('`, `')}\``), ...languages.map(lang => `\`${Myriad.Languages.get(lang).join('`, `')}\``),
'', '',
'See the readme for usage examples: <https://github.com/1Computer1/comp_iler>' 'For usage examples, see: <https://haste.snrd.de/compiler.md>'
]); ]);
} }
} }

View file

@ -4,12 +4,12 @@ const client = new CompilerClient(config);
client.once('ready', () => { client.once('ready', () => {
// eslint-disable-next-line no-console // 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.on('ready', () => {
client.user.setPresence({ client.user.setPresence({
activity: { name: '@Comp_iler help' }, activity: { name: `${config.prefix} help` },
status: 'online' status: 'online'
}); });
}); });

View file

@ -52,11 +52,11 @@ class MessageInvalidListener extends Listener {
const output = `\`\`\`\n${response}\n\`\`\``; const output = `\`\`\`\n${response}\n\`\`\``;
if (output.length >= 2000) { 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(res => res.json())
.then(json => json.key); .then(json => json.key);
return message.util.send(`Output was too long: <https://hasteb.in/${key}>`); return message.util.send(`Output was too long: <https://haste.snrd.de/${key}>`);
} }
return message.util.send(output); return message.util.send(output);

View file

@ -6,7 +6,7 @@ class Myriad {
} }
url(k) { url(k) {
return `http://localhost:${this.port}/${k}`; return `http://127.0.0.1:${this.port}/${k}`;
} }
getLanguages() { getLanguages() {
@ -53,13 +53,16 @@ class Myriad {
const entries = [ const entries = [
['apl', ['apl']], ['apl', ['apl']],
['arnoldc', ['arnoldc', 'arnold']],
['bash', ['bash', 'sh']], ['bash', ['bash', 'sh']],
['brainfuck', ['brainfuck', 'bf']], ['brainfuck', ['brainfuck', 'bf']],
['c', ['c']], ['c', ['c']],
['cpp', ['cpp']], ['cpp', ['cpp']],
['csharp', ['csharp', 'cs']], ['csharp', ['csharp', 'cs']],
['elixir', ['elixir']], ['elixir', ['elixir']],
['emojicode', ['emojicode', 'emojic', '😂']],
['erlang', ['erlang', 'erl']], ['erlang', ['erlang', 'erl']],
['d', ['dlang', 'd']],
['fsharp', ['fsharp', 'fs']], ['fsharp', ['fsharp', 'fs']],
['go', ['golang', 'go']], ['go', ['golang', 'go']],
['haskell', ['haskell', 'hs']], ['haskell', ['haskell', 'hs']],
@ -68,6 +71,7 @@ const entries = [
['javascript', ['javascript', 'js']], ['javascript', ['javascript', 'js']],
['julia', ['julia']], ['julia', ['julia']],
['lua', ['lua']], ['lua', ['lua']],
['lolcode', ['lolcode', 'lol']],
['nim', ['nim', 'nimrod']], ['nim', ['nim', 'nimrod']],
['ocaml', ['ocaml', 'ml']], ['ocaml', ['ocaml', 'ml']],
['pascal', ['pascal', 'pas', 'freepascal']], ['pascal', ['pascal', 'pas', 'freepascal']],
@ -79,6 +83,7 @@ const entries = [
['racket', ['lisp']], ['racket', ['lisp']],
['ruby', ['ruby', 'rb']], ['ruby', ['ruby', 'rb']],
['rust', ['rust', 'rs']], ['rust', ['rust', 'rs']],
['setlx', ['setlx', 'stlx']],
['typescript', ['typescript', 'ts']] ['typescript', ['typescript', 'ts']]
]; ];