mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 16:19:12 +02:00
Drop stringToBinary Dependency
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
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 {
|
module.exports = class BinaryCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
|
|
||||||
String.prototype.shuffle = function() {
|
String.prototype.shuffle = function() {
|
||||||
let a = this.split(''),
|
let a = this.split(''),
|
||||||
n = a.length;
|
n = a.length;
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "23.0.2",
|
"version": "23.1.0",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "shardingmanager.js",
|
"main": "shardingmanager.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -28,7 +28,6 @@
|
|||||||
"morse": "^0.1.0",
|
"morse": "^0.1.0",
|
||||||
"pirate-speak": "^1.0.1",
|
"pirate-speak": "^1.0.1",
|
||||||
"roman-numeral-converter-mmxvi": "^1.0.5",
|
"roman-numeral-converter-mmxvi": "^1.0.5",
|
||||||
"string-to-binary": "^0.1.2",
|
|
||||||
"superagent": "^3.5.2",
|
"superagent": "^3.5.2",
|
||||||
"zalgolize": "^1.2.4"
|
"zalgolize": "^1.2.4"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user