Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const discord = require("discord.js");
- var bot = new discord.Client();
- const prefix = "*";
- var online = true;
- var blockedusers = [
- 288446214939082754, // Pruxis
- 277923231544115201, // Kiddie_Cannon
- 253731784288632832 // 911costguard
- ]
- var superusers = [
- 183270845857136641 // Wubz
- ]
- var blacklistedservers = [
- 306153640023031820, // S.CF
- 211228845771063296 // HD
- ]
- var haspears = []
- bot.on("message", function(msg) {
- if (!msg.content.startsWith(prefix) || UserBanned(msg.author.id) || ArrayContaining(blacklistedservers, msg.guild.id)) return;
- CMDHandling(msg);
- })
- function UserBanned(id) {
- ArrayContaining(id);
- }
- function GetArgs(m) {
- return m.content.substring(prefix.length).split(" ");
- }
- function ArrayContaining(a, x) {
- for (i = 0; i < a.length; i++) {
- if (a[i] == x) {
- return true;
- break;
- }
- }
- return false;
- }
- function CMDHandling(m) {
- args = GetArgs(m);
- console.log("UserID: " + m.author.id + " has attempted the command \"" + args[0] + "\" on the server: " + m.guild.id + "!");
- switch (args[0].toLowerCase()) {
- case "pear":
- PearSending(m);
- }
- }
- function PearSending(m) {
- setTimeout(function(){
- if (ArrayContaining(haspears, m.author.id) && !ArrayContaining(superusers, m.author.id)) {
- var embed = new discord.RichEmbed()
- .setTitle("My Really Fast Keybaord (Not A Selfbot I Swear)")
- .setColor(0xCB2431)
- .setDescription("You already got a boneless pear, here is dis boned pear.")
- m.channel.send({embed});
- }
- else {
- haspears.push(m.author.id);
- var embed = new discord.RichEmbed()
- .setTitle("My Really Fast Keybaord (Not A Selfbot I Swear)")
- .setColor(0x31AD15)
- .setDescription("Here you go :b: this is a legendary boneless pear.")
- m.channel.send({embed});
- }
- }, 500);
- }
- bot.on("ready", function() {
- console.log("My mechanical keyboard for my fast typing skills is ready.");
- })
- bot.login("kys lol");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement