eslint config aqua

This commit is contained in:
Daniel Odendahl Jr
2017-07-27 21:00:54 +00:00
parent 93fd5f6caa
commit 53e1d6a8ff
176 changed files with 6713 additions and 7642 deletions
+33 -30
View File
@@ -1,36 +1,39 @@
const Command = require('../../structures/Command');
module.exports = class BinaryCommand extends Command {
constructor(client) {
super(client, {
name: 'binary',
group: 'text-edit',
memberName: 'binary',
description: 'Converts text to binary.',
args: [
{
key: 'text',
prompt: 'What text would you like to convert to binary?',
type: 'string',
validate: (text) => {
if (this.binary(text).length < 2000) return true;
else return 'Your text is too long.';
}
}
]
});
}
constructor(client) {
super(client, {
name: 'binary',
group: 'text-edit',
memberName: 'binary',
description: 'Converts text to binary.',
args: [
{
key: 'text',
prompt: 'What text would you like to convert to binary?',
type: 'string',
validate: text => {
if (this.binary(text).length < 2000) return true;
return 'Your text is too long.';
}
}
]
});
}
run(msg, args) {
const { text } = args;
const converted = this.binary(text);
return msg.say(converted);
}
run(msg, args) {
const { text } = args;
const converted = this.binary(text);
return msg.say(converted);
}
binary(text) {
return unescape(encodeURIComponent(text)).split('').map((str) => {
const converted = str.charCodeAt(0).toString(2);
return `${'00000000'.slice(converted.length)}${converted}`;
}).join('');
}
binary(text) {
return unescape(encodeURIComponent(text))
.split('')
.map(str => {
const converted = str.charCodeAt(0).toString(2);
return `${'00000000'.slice(converted.length)}${converted}`;
})
.join('');
}
};