Files
xiao/commands/text-edit/sha-256.js
T
2018-11-03 18:21:19 +00:00

25 lines
549 B
JavaScript

const Command = require('../../structures/Command');
const { hash } = require('../../util/Util');
module.exports = class SHA256Command extends Command {
constructor(client) {
super(client, {
name: 'sha-256',
group: 'text-edit',
memberName: 'sha-256',
description: 'Creates a hash of text with the SHA-256 algorithm.',
args: [
{
key: 'text',
prompt: 'What text would you like to create an SHA-256 hash of?',
type: 'string'
}
]
});
}
run(msg, { text }) {
return msg.say(hash(text, 'sha256'));
}
};