mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 06:45:31 +02:00
sha256
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const crypto = require('crypto');
|
||||
|
||||
module.exports = class SHA256Command extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'sha-256',
|
||||
aliases: ['sha-256-hash'],
|
||||
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(crypto.createHash('sha256').update(text).digest('hex'));
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "65.1.1",
|
||||
"version": "65.2.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user