mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 06:37:32 +02:00
Bug Fixes and Minor Modifications
This commit is contained in:
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"banned": {
|
|
||||||
"BANNEDUSERID": "BANNEDUSERID"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
const commando = require('discord.js-commando');
|
const commando = require('discord.js-commando');
|
||||||
const banlist = require('./banlist.json');
|
|
||||||
const config = require('../../config.json');
|
const config = require('../../config.json');
|
||||||
|
|
||||||
module.exports = class ContactCommand extends commando.Command {
|
module.exports = class ContactCommand extends commando.Command {
|
||||||
@@ -22,9 +21,6 @@ module.exports = class ContactCommand extends commando.Command {
|
|||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
hasPermission(msg) {
|
|
||||||
return !banlist.banned[msg.author.id];
|
|
||||||
}
|
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm') {
|
if (message.channel.type !== 'dm') {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
const commando = require('discord.js-commando');
|
const commando = require('discord.js-commando');
|
||||||
|
|
||||||
const memecodes = ['tenguy', 'afraid', 'older', 'aag', 'tried', 'biw', 'blb', 'kermit', 'bd', 'ch', 'cbg', 'wonka', 'cb', 'keanu', 'dsm', 'live', 'ants', 'doge', 'alwaysonbeat', 'ermg', 'facepalm', 'fwp', 'fa', 'fbf', 'fry', 'hipster', 'icanhas', 'crazypills', 'mw', 'noidea', 'regret', 'boat', 'hagrid', 'sohappy', 'captain', 'inigo', 'iw', 'ackbar', 'happening', 'joker', 'ive', 'll', 'morpheus', 'mb', 'badchoice', 'mmm', 'jetpack', 'red', 'mordor', 'oprah', 'oag', 'remembers', 'philosoraptor', 'jw', 'patrick', 'rollsafe', 'sad-obama', 'sad-clinton', 'sadfrog', 'sad-bush', 'sad-biden', 'sad-boehner', 'saltbae', 'sarcasticbear', 'dwight', 'sb', 'ss', 'sf', 'dodgson', 'money', 'sohot', 'nice', 'awesome-awkward', 'awesome', 'awkward-awesome', 'awkward', 'fetch', 'success', 'scc', 'ski', 'officespace', 'interesting', 'toohigh', 'bs', 'center', 'both', 'winter', 'xy', 'buzz', 'yodawg', 'uno', 'yallgot', 'bad', 'elf', 'chosen'];
|
const memecodes = ['tenguy', 'afraid', 'older', 'aag', 'tried', 'biw', 'blb', 'kermit', 'bd', 'ch', 'cbg', 'wonka', 'cb', 'keanu', 'dsm', 'live', 'ants', 'doge', 'alwaysonbeat', 'ermg', 'facepalm', 'fwp', 'fa', 'fbf', 'fry', 'hipster', 'icanhas', 'crazypills', 'mw', 'noidea', 'regret', 'boat', 'hagrid', 'sohappy', 'captain', 'inigo', 'iw', 'ackbar', 'happening', 'joker', 'ive', 'll', 'morpheus', 'mb', 'badchoice', 'mmm', 'jetpack', 'red', 'mordor', 'oprah', 'oag', 'remembers', 'philosoraptor', 'jw', 'patrick', 'rollsafe', 'sad-obama', 'sad-clinton', 'sadfrog', 'sad-bush', 'sad-biden', 'sad-boehner', 'saltbae', 'sarcasticbear', 'dwight', 'sb', 'ss', 'sf', 'dodgson', 'money', 'sohot', 'nice', 'awesome-awkward', 'awesome', 'awkward-awesome', 'awkward', 'fetch', 'success', 'scc', 'ski', 'officespace', 'interesting', 'toohigh', 'bs', 'center', 'both', 'winter', 'xy', 'buzz', 'yodawg', 'uno', 'yallgot', 'bad', 'elf', 'chosen'];
|
||||||
|
|
||||||
module.exports = class MemeCommand extends commando.Command {
|
module.exports = class MemeCommand extends commando.Command {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ const commando = require('discord.js-commando');
|
|||||||
const request = require('superagent');
|
const request = require('superagent');
|
||||||
const cheerio = require('cheerio');
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
module.exports = class DefineCommand extends commando.Command {
|
module.exports = class ImageSearchCommand extends commando.Command {
|
||||||
constructor(Client) {
|
constructor(Client) {
|
||||||
super(Client, {
|
super(Client, {
|
||||||
name: 'image',
|
name: 'image',
|
||||||
|
|||||||
@@ -2,21 +2,22 @@ const commando = require('discord.js-commando');
|
|||||||
const request = require('superagent');
|
const request = require('superagent');
|
||||||
const config = require('../../config.json');
|
const config = require('../../config.json');
|
||||||
|
|
||||||
module.exports = class RinSayCommand extends commando.Command {
|
module.exports = class WebhookCommand extends commando.Command {
|
||||||
constructor(Client) {
|
constructor(Client) {
|
||||||
super(Client, {
|
super(Client, {
|
||||||
name: 'rin',
|
name: 'webhook',
|
||||||
aliases: [
|
aliases: [
|
||||||
|
'rin',
|
||||||
'rinsay'
|
'rinsay'
|
||||||
],
|
],
|
||||||
group: 'textedit',
|
group: 'textedit',
|
||||||
memberName: 'rin',
|
memberName: 'webhook',
|
||||||
description: "Posts a message to the Rin webhook in Heroes of Dreamland. (;rin Hey guys!)",
|
description: "Posts a message to the webhook defined in config. (;webhook Hey guys!)",
|
||||||
examples: [";rin Hey guys!"],
|
examples: [";webhook Hey guys!"],
|
||||||
guildOnly: true,
|
guildOnly: true,
|
||||||
args: [{
|
args: [{
|
||||||
key: 'text',
|
key: 'text',
|
||||||
prompt: 'What text would you like Rin to say?',
|
prompt: 'What text would you like the webhook to say?',
|
||||||
type: 'string'
|
type: 'string'
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
@@ -30,12 +31,12 @@ module.exports = class RinSayCommand extends commando.Command {
|
|||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'MANAGE_MESSAGES'])) return;
|
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'MANAGE_MESSAGES'])) return;
|
||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let rinContent = args.text;
|
let content = args.text;
|
||||||
try {
|
try {
|
||||||
let post = await request
|
let post = await request
|
||||||
.post(config.webhook)
|
.post(config.webhook)
|
||||||
.send({
|
.send({
|
||||||
content: rinContent
|
content: content
|
||||||
});
|
});
|
||||||
let deleteMsg = await message.delete();
|
let deleteMsg = await message.delete();
|
||||||
return [post, deleteMsg];
|
return [post, deleteMsg];
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
const commando = require('discord.js-commando');
|
const commando = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const translate = require('google-translate-api');
|
const translate = require('google-translate-api');
|
||||||
|
|
||||||
const languages = {
|
const languages = {
|
||||||
"auto": "Automatic",
|
"auto": "Automatic",
|
||||||
"af": "Afrikaans",
|
"af": "Afrikaans",
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ module.exports = class YodaCommand extends commando.Command {
|
|||||||
'Accept': 'text/plain'
|
'Accept': 'text/plain'
|
||||||
})
|
})
|
||||||
.query({
|
.query({
|
||||||
sentence: turnToYoda
|
sentence: encodeURI(turnToYoda)
|
||||||
});
|
});
|
||||||
if (!response.text) return message.say(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
if (!response.text) return message.say(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||||
return message.say(response.text);
|
return message.say(response.text);
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
"Sherlock": "github:neilgupta/Sherlock",
|
"Sherlock": "github:neilgupta/Sherlock",
|
||||||
"cheerio": "^0.22.0",
|
"cheerio": "^0.22.0",
|
||||||
"cowsay": "^1.1.9",
|
"cowsay": "^1.1.9",
|
||||||
"discord.js": "github:hydrabolt/discord.js#1cb227d6d845318bee47916e9e429ae094c4936a",
|
"discord.js": "github:hydrabolt/discord.js",
|
||||||
"discord.js-commando": "github:gawdl3y/discord.js-commando",
|
"discord.js-commando": "github:gawdl3y/discord.js-commando",
|
||||||
"google-translate-api": "^2.2.2",
|
"google-translate-api": "^2.2.2",
|
||||||
"hepburn": "^1.0.0",
|
"hepburn": "^1.0.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user