Skip to content

Commit

Permalink
rewrote local script loader and message event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon1320 committed Sep 7, 2018
1 parent aa50ca8 commit 614aa82
Show file tree
Hide file tree
Showing 62 changed files with 1,399 additions and 1,097 deletions.
25 changes: 14 additions & 11 deletions src/bot/command.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
"use strict";

class Command {
constructor(name, description, type, permissions, match, match_type, order, passthrough, assets, cb) {
this.name = name;
this.description = description;
this.type = type;
this.permissions = permissions;
this.match = match;
this.match_type = match_type;
this.order = order;
this.passthrough = passthrough;
this.assets = assets;
this.cb = cb;
constructor(options) {

this.name = options.name;
this.description = options.description;
this.thumbnail = options.thumbnail;
this.marketplace_enabled = options.marketplace_enabled;

this.type = options.type;
this.match_type = options.match_type;
this.match = options.match;

this.featured = options.featured;

this.cb = options.cb;
}
run(client, message, guildDoc) {
this.cb(client, message, guildDoc);
Expand Down
2 changes: 1 addition & 1 deletion src/bot/commands/addscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ const addscript = new Command("addscript", "adds a new script", "js", 0, "addscr
});
});

module.exports = addscript;
//module.exports = addscript;
2 changes: 1 addition & 1 deletion src/bot/commands/advice.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ const advice = new Command("advice", "Awesom-e advice!", "js", 0, "advice", "com

});

module.exports = advice;
//module.exports = advice;
2 changes: 1 addition & 1 deletion src/bot/commands/america.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ const america = new Command("america", "I thought this is America!", "js", 0, "a
}
});

module.exports = america;
//module.exports = america;
2 changes: 1 addition & 1 deletion src/bot/commands/artcomp.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,5 @@ const artcomp = new Command("artcomp", "permissions lol", "js", 0, "artcomp", "c
message.channel.send(new discord.RichEmbed().setColor(0xff594f).setAuthor(randomobject.name).setDescription(randomobject.desc).setImage(randomobject.file));
});

module.exports = artcomp;
//module.exports = artcomp;

2 changes: 1 addition & 1 deletion src/bot/commands/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ const avatar = new Command("avatar", "get users avatars", "js", 0, "avatar", "co
return;
}
});
module.exports = avatar;
//module.exports = avatar;
2 changes: 1 addition & 1 deletion src/bot/commands/back.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const back = new Command("back", "Im baaaaack", "js", 0, "back", "command", 0, f

});

module.exports = back;
//module.exports = back;
2 changes: 1 addition & 1 deletion src/bot/commands/batman.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ const batman = new Command("batman", "summons a brave dark knight", "js", 0, "ba
});
});

module.exports = batman;
//module.exports = batman;

2 changes: 1 addition & 1 deletion src/bot/commands/butters.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ const butters = new Command("butters", "random photo of butters", "js", 0, "butt

});

module.exports = butters;
//module.exports = butters;
2 changes: 1 addition & 1 deletion src/bot/commands/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,4 +589,4 @@ const card = new Command("card", "phone destroyer", "js", 0, "card", "command",
});
});

module.exports = card;
//module.exports = card;
2 changes: 1 addition & 1 deletion src/bot/commands/coinflip.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const coinflip = new Command("coinflip", "wonks", "js", 0, "coinflip", "command"

});

module.exports = coinflip;
//module.exports = coinflip;
2 changes: 1 addition & 1 deletion src/bot/commands/colour.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ const colour = new Command("colour", "0xff594f", "js", 0, "colour", "command", 0
message.channel.send(new discord.RichEmbed().setColor(0xff594f).setDescription("The Feinwaru colour is: **0xff594f**"));
});

module.exports = colour;
//module.exports = colour;

2 changes: 1 addition & 1 deletion src/bot/commands/dam.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const dam = new Command("dam", "i broke the dam", "js", 0, "I broke the dam", "s

});

module.exports = dam;
//module.exports = dam;
2 changes: 1 addition & 1 deletion src/bot/commands/dice.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const dice = new Command("dice", "roll a digital dice", "js", 0, "dice", "comman
message.reply(Math.floor(Math.random() * 6) + 1);
});

module.exports = dice;
//module.exports = dice;
2 changes: 1 addition & 1 deletion src/bot/commands/dick.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const dick = new Command("dick", "Stop being a dick Scott", "js", 0, "dick", "co

});

module.exports = dick;
//module.exports = dick;
2 changes: 1 addition & 1 deletion src/bot/commands/f.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const f = new Command("f", "repects", "js", 0, "f", "command", 0, false, null, f
message.reply("Repects have been paid.");
});

module.exports = f;
//module.exports = f;
2 changes: 1 addition & 1 deletion src/bot/commands/fm.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ const fm = new Command("fm", "lastfm lol", "js", 0, "fm", "command", 0, false, n
});
});

module.exports = fm;
//module.exports = fm;
2 changes: 1 addition & 1 deletion src/bot/commands/fuckyou.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const fuckyou = new Command("fuckyou", "Fuck you", "js", 0, "fuckyou", "command"

});

module.exports = fuckyou;
//module.exports = fuckyou;
2 changes: 1 addition & 1 deletion src/bot/commands/fuckyourself.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ const fuckyourself = new Command("fuckyourself", "Go fuck yourself", "js", 0, "f

});

module.exports = fuckyourself;
//module.exports = fuckyourself;

2 changes: 1 addition & 1 deletion src/bot/commands/gif.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ const gif = new Command("gif", "posts a random gif related to south park", "js",

});

module.exports = gif;
//module.exports = gif;
2 changes: 1 addition & 1 deletion src/bot/commands/harvest.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ const harvest = new Command("harvest", "which celeb is up for it this year?", "j
.setURL("https://youtu.be/6H3UiwU1N5I?t=3m2s"));
});

module.exports = harvest;
//module.exports = harvest;
2 changes: 1 addition & 1 deletion src/bot/commands/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ const help = new Command("help", "filthy frank", "js", 0, "help", "command", 0,
.setFooter("These dev people are cool, I guess."));
});

module.exports = help;
//module.exports = help;

2 changes: 1 addition & 1 deletion src/bot/commands/infoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ const infoc = new Command("infoc", "a command for getting info on channels", "js
}
});

module.exports = infoc;
//module.exports = infoc;
2 changes: 1 addition & 1 deletion src/bot/commands/infoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ const infoe = new Command("infoe", "a command for getting info on emojis", "js",
}
});

module.exports = infoe;
//module.exports = infoe;
2 changes: 1 addition & 1 deletion src/bot/commands/infom.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ const infom = new Command("infom", "a command for getting info on members", "js"
}
});

module.exports = infom;
//module.exports = infom;
2 changes: 1 addition & 1 deletion src/bot/commands/infor.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ const infor = new Command("infor", "a command for getting info on roles", "js",
}
});

module.exports = infor;
//module.exports = infor;
2 changes: 1 addition & 1 deletion src/bot/commands/kickbaby.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const kickbaby = new Command("kickbaby", "kicks the baby", "js", 0, "kick the ba

});

module.exports = kickbaby;
//module.exports = kickbaby;
2 changes: 1 addition & 1 deletion src/bot/commands/love.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ const love = new Command("love", "quotes chef", "js", 0, "love", "command", 0, f
message.channel.send(new discord.RichEmbed().setColor(0xff594f).setAuthor("AWESOM-O // Love!", "https://cdn.discordapp.com/attachments/437671103536824340/462653108636483585/a979694bf250f2293d929278328b707c.png").setThumbnail("https://vignette.wikia.nocookie.net/southpark/images/3/38/JeromeChef.png/revision/latest?cb=20160402120214").setDescription(chefquotes[Math.floor(Math.random() * chefquotes.length)]).setFooter("Hello there, children!"));
});

module.exports = love;
//module.exports = love;
2 changes: 1 addition & 1 deletion src/bot/commands/member.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ const member = new Command("member", "summons the member berries", "js", 0, "mem

});

module.exports = member;
//module.exports = member;
2 changes: 1 addition & 1 deletion src/bot/commands/micro.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ const micro = new Command("micro", "Microaggression! Hit 'em", "js", 0, "micro",
});
});

module.exports = micro;
//module.exports = micro;
2 changes: 1 addition & 1 deletion src/bot/commands/movieidea.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ const movieidea = new Command("movieideas", "Gives out a movie idea", "js", 0, "

});

module.exports = movieidea;
//module.exports = movieidea;
2 changes: 1 addition & 1 deletion src/bot/commands/nathan.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ const nathan = new Command("nathan", "possible downs kid", "js", 0, "nathan", "c
message.channel.send(new discord.RichEmbed().setColor(0xff594f).setAuthor("AWESOM-O // Nathan Moments!, https://cdn.discordapp.com/attachments/437671103536824340/462653108636483585/a979694bf250f2293d929278328b707c.png").setDescription("Various moments from Nathan... *and Mimsy...*").setImage(quotes[random]));
});

module.exports = nathan;
//module.exports = nathan;
2 changes: 1 addition & 1 deletion src/bot/commands/nathanrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ const nathanrate = new Command("nathanrate", "possible downs kid 2", "js", 0, "n
message.channel.send(new discord.RichEmbed().setColor(0xff594f).setDescription(quotes[random]));
});

module.exports = nathanrate;
//module.exports = nathanrate;
2 changes: 1 addition & 1 deletion src/bot/commands/purge.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ const purge = new Command("purge", "for the next 50 messages, all deletes are le
message.channel.bulkDelete(deleteCount, true);
});

module.exports = purge;
//module.exports = purge;
2 changes: 1 addition & 1 deletion src/bot/commands/random.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ const random = new Command("random", "random episodes", "js", 0, "random", "comm
});
});

module.exports = random;
//module.exports = random;
2 changes: 1 addition & 1 deletion src/bot/commands/reminder.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ let reminder = new Command("reminder", "Towelie's important message!", "js", 0,
}
});

module.exports = reminder;
//module.exports = reminder;
2 changes: 1 addition & 1 deletion src/bot/commands/remscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ const remscript = new Command("remscript", "removes a new script", "js", 0, "rem
})
});

module.exports = remscript;
//module.exports = remscript;
2 changes: 1 addition & 1 deletion src/bot/commands/repects.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ let repects = new Command ("repects", "press f to pay repects", "js", 0, "f", "c
message.reply("Repects have been paid");
});

module.exports = repects;
//module.exports = repects;
2 changes: 1 addition & 1 deletion src/bot/commands/rps.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const rps = new Command("rps", "wonks", "js", 0, "rps", "command", 0, false, nul
message.reply(rand === 0 ? "Rock" : rand === 1 ? "Paper" : "Scissors");
});

module.exports = rps;
//module.exports = rps;
2 changes: 1 addition & 1 deletion src/bot/commands/rr.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ const rr = new Command("rr", "the ultimate life and death test", "js", 0, "rr",
}
});

module.exports = rr;
//module.exports = rr;
2 changes: 1 addition & 1 deletion src/bot/commands/ship.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ let ship = new Command("ship", "conformist", "js", 0, "ship", "command", 0, fals
message.channel.send("**:heart: Here's your ship:** " + males[randommale] + " **x** " + females[randomfemale] + " :heart:");
});

module.exports = ship;
//module.exports = ship;
2 changes: 1 addition & 1 deletion src/bot/commands/shipyaoi.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ let shipyaoi = new Command("shipyaoi", "gay", "js", 0, "shipyaoi", "command", 0,
}
});

module.exports = shipyaoi;
//module.exports = shipyaoi;
2 changes: 1 addition & 1 deletion src/bot/commands/shipyuri.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ let shipyuri = new Command("shipyuri", "use this fucking command", "js", 0, "shi
}
});

module.exports = shipyuri;
//module.exports = shipyuri;
2 changes: 1 addition & 1 deletion src/bot/commands/someone.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ let someone = new Command("someone", "Fuck you, Discord.", "js", 0, "@someone",
message.channel.send(quotes[random1] + " " + members[random2].user.username);
});

module.exports = someone;
//module.exports = someone;


2 changes: 1 addition & 1 deletion src/bot/commands/spaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ let spaces = new Command("spaces", "a e s t h e t i c", "js", 0, "spaces", "comm
message.channel.send(modified)
});

module.exports = spaces;
//module.exports = spaces;


2 changes: 1 addition & 1 deletion src/bot/commands/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const test = new Command("test", "testing...", "js", 0, "test", "command", 0, fa
message.reply("testing...")
});

module.exports = test;
//module.exports = test;
2 changes: 1 addition & 1 deletion src/bot/commands/thinking.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const thinking = new Command("thinking", "things that make you go hmmm...", "js"

});

module.exports = thinking;
//module.exports = thinking;
2 changes: 1 addition & 1 deletion src/bot/commands/times.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ const times = new Command("times", "mr worldwide", "js", 0, "times", "command",
.setThumbnail("https://cdn.discordapp.com/attachments/379432139856412682/401485874040143872/hmmwhatsthetime.png"));
});

module.exports = times;
//module.exports = times;

0 comments on commit 614aa82

Please sign in to comment.