aboutsummaryrefslogtreecommitdiff
path: root/commands/Utility/character.js
diff options
context:
space:
mode:
authorJustin <jtsshieh@outlook.com>2019-11-02 11:02:19 -0400
committerJustin <jtsshieh@outlook.com>2019-11-02 11:02:19 -0400
commit7031fa12ba79281edc49df972311c13ad0e8fa53 (patch)
tree60410a33fe45add85a9dc962c975be478f3f8cff /commands/Utility/character.js
parent106530d5dc53166632a6a0ecc8930eb2b1ed4bfd (diff)
downloadPokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.tar.gz
PokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.tar.bz2
PokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.zip
es-lint settings added + linted all files
Diffstat (limited to 'commands/Utility/character.js')
-rw-r--r--commands/Utility/character.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/commands/Utility/character.js b/commands/Utility/character.js
index 56d9bfb..2ed549e 100644
--- a/commands/Utility/character.js
+++ b/commands/Utility/character.js
@@ -8,14 +8,16 @@
* *************************************/
exports.run = (bot, msg, args) => {
- const { RichEmbed } = require('discord.js');
+ const {RichEmbed} = require('discord.js');
const embed = new RichEmbed()
.setTitle('***Character Analysis***')
.setDescription('Find out the decimal and hexadecimal of each and every character in a string.')
.setColor('#000');
const str = args.join(' ');
- if (str.length > 50) return msg.reply('The limit is 50 for how many characters you can input');
+ if (str.length > 50) {
+ return msg.reply('The limit is 50 for how many characters you can input');
+ }
const array = str.split('');
let decimal = '';
@@ -29,22 +31,22 @@ exports.run = (bot, msg, args) => {
const code = str.charCodeAt(x);
let codeHex = code.toString(16).toUpperCase();
while (codeHex.length < 4) {
- codeHex = '0' + codeHex;
+ codeHex = `0${codeHex}`;
}
hexadecimal += `\`\\u${codeHex}\`\t${array[x]}\n`;
}
embed.addField('*Hexadecimal*', hexadecimal, true);
- msg.channel.send({ embed });
+ msg.channel.send({embed});
};
exports.conf = {
aliases: [],
- guildOnly: true,
+ guildOnly: true
};
exports.help = {
name: 'character',
description: 'Gets the decimal and hexadecimal of (a) character(s)',
- usage: '<...characters>',
+ usage: '<...characters>'
};