Merge highlight
and aliases
options
This commit is contained in:
parent
b3a6858ac0
commit
9a5258d91d
8 changed files with 4 additions and 12 deletions
|
@ -3,8 +3,7 @@ const Language = require('../struct/Language');
|
|||
class FSharp extends Language {
|
||||
constructor() {
|
||||
super('fsharp', {
|
||||
highlight: 'fs',
|
||||
aliases: ['fsharp', 'f#', 'fs']
|
||||
aliases: ['fsharp', 'fs']
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,7 @@ const Language = require('../struct/Language');
|
|||
class Go extends Language {
|
||||
constructor() {
|
||||
super('go', {
|
||||
highlight: 'go',
|
||||
aliases: ['go']
|
||||
aliases: ['golang', 'go']
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ const Language = require('../struct/Language');
|
|||
class Haskell extends Language {
|
||||
constructor() {
|
||||
super('haskell', {
|
||||
highlight: 'hs',
|
||||
aliases: ['haskell', 'hs'],
|
||||
options: {
|
||||
e: () => ''
|
||||
|
|
|
@ -3,7 +3,6 @@ const Language = require('../struct/Language');
|
|||
class JavaScript extends Language {
|
||||
constructor() {
|
||||
super('javascript', {
|
||||
highlight: 'js',
|
||||
aliases: ['javascript', 'js'],
|
||||
options: {
|
||||
harmony: () => '',
|
||||
|
|
|
@ -3,8 +3,7 @@ const Language = require('../struct/Language');
|
|||
class Pascal extends Language {
|
||||
constructor() {
|
||||
super('pascal', {
|
||||
highlight: 'pas',
|
||||
aliases: ['pascal', 'pas']
|
||||
aliases: ['pascal', 'pas', 'freepascal']
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ const Language = require('../struct/Language');
|
|||
class Python extends Language {
|
||||
constructor() {
|
||||
super('python', {
|
||||
highlight: 'py',
|
||||
aliases: ['python', 'py'],
|
||||
loads: ['python3', 'python2'],
|
||||
options: {
|
||||
|
|
|
@ -45,7 +45,7 @@ class MessageInvalidListener extends Listener {
|
|||
}
|
||||
|
||||
const invalid = parse.invalid.length ? `Invalid options: ${parse.invalid.join(', ')}\n` : '';
|
||||
const output = `${invalid}\`\`\`${parse.language.highlight}\n${result}\`\`\``;
|
||||
const output = `${invalid}\`\`\`${parse.language.aliases[0]}\n${result}\`\`\``;
|
||||
if (output.length >= 2000) {
|
||||
const key = await fetch('https://hastebin.com/documents', { method: 'POST', body: result })
|
||||
.then(res => res.json())
|
||||
|
|
|
@ -3,14 +3,12 @@ const { AkairoModule } = require('discord-akairo');
|
|||
class Language extends AkairoModule {
|
||||
constructor(id, {
|
||||
category,
|
||||
highlight,
|
||||
aliases,
|
||||
loads = [id],
|
||||
options = {}
|
||||
} = {}) {
|
||||
super(id, { category });
|
||||
|
||||
this.highlight = highlight;
|
||||
this.aliases = aliases;
|
||||
this.loads = loads;
|
||||
this.options = options;
|
||||
|
|
Loading…
Reference in a new issue