mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Yay I can Install my own dependencies
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const translator = require('../../functions/translator.js');
|
||||
const translator = require('custom-translate');
|
||||
const morse = {
|
||||
"a": ".-",
|
||||
"b": "-...",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const translator = require('../../functions/translator.js');
|
||||
const translator = require('custom-translate');
|
||||
const { dictionary } = require('./piratewords.json');
|
||||
|
||||
module.exports = class PirateCommand extends Command {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const translator = require('../../functions/translator.js');
|
||||
const translator = require('custom-translate');
|
||||
const { dictionary } = require('./temmiewords.json');
|
||||
|
||||
module.exports = class TemmieCommand extends Command {
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
module.exports.wordTrans = (text, words) => {
|
||||
text = text.split(' ');
|
||||
let translation = [];
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
const word = text[i].toLowerCase();
|
||||
const wordPuncStrip = word.replace(/[\[\\^$.|?*+()\]]/g, '');
|
||||
if (words[wordPuncStrip]) {
|
||||
const reg = new RegExp(wordPuncStrip, 'gi');
|
||||
translation.push(word.replace(reg, words[wordPuncStrip]));
|
||||
}
|
||||
else {
|
||||
translation.push(word);
|
||||
}
|
||||
}
|
||||
return translation.join(' ');
|
||||
};
|
||||
|
||||
module.exports.letterTrans = (text, letters, joinWith) => {
|
||||
text = text.split('');
|
||||
let translation = [];
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
const letter = text[i];
|
||||
if (letters[letter]) {
|
||||
translation.push(letters[letter]);
|
||||
}
|
||||
else {
|
||||
translation.push(letter);
|
||||
}
|
||||
}
|
||||
joinWith = joinWith || '';
|
||||
return translation.join(joinWith);
|
||||
};
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "24.0.1",
|
||||
"version": "24.1.0",
|
||||
"description": "A Discord Bot",
|
||||
"main": "shardingmanager.js",
|
||||
"repository": {
|
||||
@@ -17,6 +17,7 @@
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cheerio": "^0.22.0",
|
||||
"custom-translate": "dragonfire535/custom-translate",
|
||||
"discord.js": "hydrabolt/discord.js",
|
||||
"discord.js-commando": "gawdl3y/discord.js-commando",
|
||||
"jimp": "^0.2.27",
|
||||
|
||||
Reference in New Issue
Block a user