Bug Fixes and Minor Modifications

This commit is contained in:
Daniel Odendahl Jr
2017-04-01 23:54:28 +00:00
parent 8ed6e15aff
commit ae3d5745b6
8 changed files with 12 additions and 22 deletions
-5
View File
@@ -1,5 +0,0 @@
{
"banned": {
"BANNEDUSERID": "BANNEDUSERID"
}
}
-4
View File
@@ -1,5 +1,4 @@
const commando = require('discord.js-commando');
const banlist = require('./banlist.json');
const config = require('../../config.json');
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) {
if (message.channel.type !== 'dm') {
-1
View File
@@ -1,5 +1,4 @@
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'];
module.exports = class MemeCommand extends commando.Command {
+1 -1
View File
@@ -2,7 +2,7 @@ const commando = require('discord.js-commando');
const request = require('superagent');
const cheerio = require('cheerio');
module.exports = class DefineCommand extends commando.Command {
module.exports = class ImageSearchCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'image',
+9 -8
View File
@@ -2,21 +2,22 @@ const commando = require('discord.js-commando');
const request = require('superagent');
const config = require('../../config.json');
module.exports = class RinSayCommand extends commando.Command {
module.exports = class WebhookCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'rin',
name: 'webhook',
aliases: [
'rin',
'rinsay'
],
group: 'textedit',
memberName: 'rin',
description: "Posts a message to the Rin webhook in Heroes of Dreamland. (;rin Hey guys!)",
examples: [";rin Hey guys!"],
memberName: 'webhook',
description: "Posts a message to the webhook defined in config. (;webhook Hey guys!)",
examples: [";webhook Hey guys!"],
guildOnly: true,
args: [{
key: 'text',
prompt: 'What text would you like Rin to say?',
prompt: 'What text would you like the webhook to say?',
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;
}
console.log(`[Command] ${message.content}`);
let rinContent = args.text;
let content = args.text;
try {
let post = await request
.post(config.webhook)
.send({
content: rinContent
content: content
});
let deleteMsg = await message.delete();
return [post, deleteMsg];
-1
View File
@@ -1,7 +1,6 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const translate = require('google-translate-api');
const languages = {
"auto": "Automatic",
"af": "Afrikaans",
+1 -1
View File
@@ -32,7 +32,7 @@ module.exports = class YodaCommand extends commando.Command {
'Accept': 'text/plain'
})
.query({
sentence: turnToYoda
sentence: encodeURI(turnToYoda)
});
if (!response.text) return message.say(':x: Error! Something went wrong! Keep it simple to avoid this error.');
return message.say(response.text);
+1 -1
View File
@@ -19,7 +19,7 @@
"Sherlock": "github:neilgupta/Sherlock",
"cheerio": "^0.22.0",
"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",
"google-translate-api": "^2.2.2",
"hepburn": "^1.0.0",