mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 18:39:35 +02:00
Drop stringToBinary Dependency
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const stringToBinary = require('string-to-binary');
|
||||
const stringToBinary = (str) => {
|
||||
const pad = "00000000";
|
||||
return unescape(encodeURIComponent(str))
|
||||
.split('').map(str => {
|
||||
const binary = str.charCodeAt(0).toString(2);
|
||||
return pad.slice(binary.length) + binary;
|
||||
}).join('');
|
||||
};
|
||||
|
||||
module.exports = class BinaryCommand extends Command {
|
||||
constructor(client) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
String.prototype.shuffle = function() {
|
||||
let a = this.split(''),
|
||||
n = a.length;
|
||||
|
||||
Reference in New Issue
Block a user