├── assets ├── jsons │ └── config.json ├── images │ ├── 8ball.png │ ├── wanted.png │ ├── approved.png │ ├── plate_404.png │ ├── profile1.png │ ├── rainbow.png │ ├── rejected.png │ ├── thug-life.png │ ├── image_slap.png │ ├── plate_bill.png │ ├── plate_crush.png │ ├── plate_jail.png │ ├── plate_power.png │ ├── plate_shit.png │ ├── image_respects.png │ ├── plate_brazzers.png │ ├── plate_buttslap.png │ ├── plate_checkout.png │ ├── plate_delete.png │ ├── plate_tattoo.png │ ├── plate_wasted.png │ ├── plate_beautiful.png │ └── plate_triggered.png └── handlers │ ├── createDb.js │ └── addDbEntry.js ├── commands ├── foo.js ├── shrug.js ├── tableflip.js ├── unflip.js ├── hello.js ├── disabledshrug.js ├── lenny.js ├── website.js ├── support.js ├── coinflip.js ├── reverse.js ├── upvote.js ├── lottery.js ├── muk.js ├── serverroles.js ├── getchannels.js ├── say.js ├── percentage.js ├── ping.js ├── subscribe.js ├── avatar.js ├── botstatus.js ├── fish.js ├── serveremojis.js ├── embed.js ├── choose.js ├── rr.js ├── weeb.js ├── invite.js ├── sexyrate.js ├── setstatus.js ├── math.js ├── setgame.js ├── animtableflip.js ├── advice.js ├── lmgtfy.js ├── credits.js ├── yoda.js ├── dog.js ├── hentai.js ├── roll.js ├── uptime.js ├── changelog.js ├── cat.js ├── cb.js ├── donate.js ├── cuddle.js ├── pat.js ├── poke.js ├── marry.js ├── punch.js ├── drop-kick.js ├── fist-bump.js ├── high-five.js ├── divorce.js ├── inventory.js ├── hold-hands.js ├── tackle.js ├── shortenurl.js ├── hug.js ├── ass.js ├── botnick.js ├── tits.js ├── showerthoughts.js ├── wur.js ├── kiss.js ├── today.js ├── reboot.js ├── suggestion.js ├── currency.js ├── poll.js ├── clean.js ├── rep.js ├── achievement.js ├── membercount.js ├── map.js ├── roleinfo.js ├── 8ball.js ├── issue.js ├── awards.js ├── funnyNSFW.js ├── settings.js ├── redeem.js ├── takexp.js ├── mdn.js ├── takemoney.js ├── work.js ├── reddit.js ├── wiki.js ├── temp.js ├── warnings.js ├── youtube.js ├── bill.js ├── approved.js ├── exec.js ├── jail.js ├── rainbow.js ├── rejected.js ├── wasted.js ├── thuglife.js ├── trigger.js ├── serverinfo.js ├── meme.js ├── delete.js ├── brazzers.js ├── motivate.js ├── shit.js ├── nick.js ├── tattoo.js ├── beautiful.js ├── rip.js ├── deposit.js ├── power.js ├── eval.js ├── textflip.js ├── nytimes.js ├── clearwarns.js ├── withdraw.js ├── anime.js ├── urban.js ├── ship.js ├── botinfo.js ├── slap.js ├── checkout.js ├── roblox.js ├── crush.js ├── reason.js ├── dm.js ├── buttslap.js ├── prefix.js ├── reload.js ├── booksearch.js ├── itunes.js ├── antiraid.js ├── slots.js ├── hack.js ├── report.js ├── rule34.js ├── transfer.js ├── reminder.js ├── flipcoin.js ├── whois.js ├── rps.js ├── rob.js ├── roleall.js ├── modonly.js ├── google.js ├── profilesystem.js ├── givexp.js ├── rroleall.js ├── givemoney.js ├── weather.js ├── fortnite.js ├── unban.js ├── 99.js ├── kick.js ├── 25.js ├── 50.js ├── 75.js ├── antijoin.js ├── ban.js ├── hackban.js └── leaderboard.js ├── events ├── guildCreate.js ├── messageDelete.js ├── guildMemberAdd.js ├── messageUpdate.js └── guildMemberRemove.js ├── .github └── ISSUE_TEMPLATE │ ├── Bug_report.md │ └── Feature_request.md ├── License └── README.md /assets/jsons/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your token" 3 | } 4 | -------------------------------------------------------------------------------- /assets/images/8ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/8ball.png -------------------------------------------------------------------------------- /assets/images/wanted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/wanted.png -------------------------------------------------------------------------------- /assets/images/approved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/approved.png -------------------------------------------------------------------------------- /assets/images/plate_404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_404.png -------------------------------------------------------------------------------- /assets/images/profile1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/profile1.png -------------------------------------------------------------------------------- /assets/images/rainbow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/rainbow.png -------------------------------------------------------------------------------- /assets/images/rejected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/rejected.png -------------------------------------------------------------------------------- /assets/images/thug-life.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/thug-life.png -------------------------------------------------------------------------------- /assets/images/image_slap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/image_slap.png -------------------------------------------------------------------------------- /assets/images/plate_bill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_bill.png -------------------------------------------------------------------------------- /assets/images/plate_crush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_crush.png -------------------------------------------------------------------------------- /assets/images/plate_jail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_jail.png -------------------------------------------------------------------------------- /assets/images/plate_power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_power.png -------------------------------------------------------------------------------- /assets/images/plate_shit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_shit.png -------------------------------------------------------------------------------- /assets/images/image_respects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/image_respects.png -------------------------------------------------------------------------------- /assets/images/plate_brazzers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_brazzers.png -------------------------------------------------------------------------------- /assets/images/plate_buttslap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_buttslap.png -------------------------------------------------------------------------------- /assets/images/plate_checkout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_checkout.png -------------------------------------------------------------------------------- /assets/images/plate_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_delete.png -------------------------------------------------------------------------------- /assets/images/plate_tattoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_tattoo.png -------------------------------------------------------------------------------- /assets/images/plate_wasted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_wasted.png -------------------------------------------------------------------------------- /assets/images/plate_beautiful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_beautiful.png -------------------------------------------------------------------------------- /assets/images/plate_triggered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Katrixerse/Orcinus/HEAD/assets/images/plate_triggered.png -------------------------------------------------------------------------------- /commands/foo.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.reply(" Bar!") 5 | } 6 | 7 | -------------------------------------------------------------------------------- /commands/shrug.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.channel.send("¯\\_(ツ)_/¯") 5 | } -------------------------------------------------------------------------------- /commands/tableflip.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.channel.send("(╯°□°)╯︵ ┻━┻") 5 | } -------------------------------------------------------------------------------- /commands/unflip.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.channel.send("┬─┬ ノ( ゜-゜ノ)") 5 | } -------------------------------------------------------------------------------- /commands/hello.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.reply(" Hello, World!") 5 | } 6 | 7 | -------------------------------------------------------------------------------- /commands/disabledshrug.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | message.channel.send("¯\_(ツ)_/¯"); 5 | } 6 | -------------------------------------------------------------------------------- /commands/lenny.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.channel.send("( ͡° ͜ʖ ͡°)") 5 | } 6 | 7 | -------------------------------------------------------------------------------- /commands/website.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.reply(" Official bot website is: https://orcinus-bot.me") 5 | } 6 | 7 | -------------------------------------------------------------------------------- /commands/support.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.channel.send(`Support server: https://discord.gg/mzh8yhY`); 5 | } 6 | 7 | -------------------------------------------------------------------------------- /events/guildCreate.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const { addGuildtoDB } = require('../assets/handlers/addDbEntry'); 4 | module.exports = (client, guild, message) => { 5 | addGuildtoDB(); 6 | }; 7 | -------------------------------------------------------------------------------- /commands/coinflip.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | var coinflip = ['Heads!','Tails!']; 5 | message.channel.send(coinflip[Math.floor(Math.random () * coinflip.length)]); 6 | } 7 | 8 | -------------------------------------------------------------------------------- /commands/reverse.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const text = args.join(' ') 5 | const converted = text.split('').reverse().join(''); 6 | message.channel.send(`\u180E${converted}`); 7 | } 8 | 9 | -------------------------------------------------------------------------------- /commands/upvote.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const embed = new Discord.RichEmbed() 5 | .addField("Can upvote the bot at: ", "https://discordbots.org/bot/390151520722878465/vote") 6 | message.channel.send(embed) 7 | } 8 | -------------------------------------------------------------------------------- /commands/lottery.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const lottery = Math.floor(Math.random() * 100) + 1; 5 | if (lottery === 1) return message.reply(`Wow! You actually won! Great job!`); 6 | message.reply(`Nope, sorry, you lost.`); 7 | } 8 | -------------------------------------------------------------------------------- /commands/muk.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | let embed = new Discord.RichEmbed() 5 | .setImage("https://i.ytimg.com/vi/GD6qtc2_AQA/maxresdefault.jpg") 6 | .setColor(0x00A2E8) 7 | message.channel.send({embed}); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /commands/serverroles.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const role = message.guild.roles; 5 | const embed = new Discord.RichEmbed() 6 | .addField("Server Roles", role.map((e) => e).join(', ')) 7 | message.channel.send({embed}) 8 | } 9 | 10 | -------------------------------------------------------------------------------- /commands/getchannels.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.channel.send('Voice Channels: ' + `${message.guild.channels.filter(chan => chan.type === 'voice').size} | Text Channels: ${message.guild.channels.filter(chan => chan.type === 'text').size}`) 5 | } 6 | 7 | -------------------------------------------------------------------------------- /commands/say.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const saywhat = args.join(" ") 5 | if (saywhat < 1) return message.channel.send("Didn't provide any text to say") 6 | message.channel.send(`**${message.author.username}** says ` + saywhat) 7 | } 8 | -------------------------------------------------------------------------------- /commands/percentage.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | const amount = args[0] 5 | const maximum = args[1] 6 | const percentage = (amount / maximum) * 100; 7 | message.channel.send(`${amount} is ${percentage}% of ${maximum}.`); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /commands/ping.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | const msg = await message.channel.send('Pinging...'); 5 | msg.edit(":ping_pong: Time: " + Math.round(msg.createdTimestamp - message.createdTimestamp) + "ms \n :heart: Heartbeat: " + Math.round(client.ping) + "ms"); 6 | } 7 | -------------------------------------------------------------------------------- /commands/subscribe.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const user = message.mentions.users.first(); 5 | 6 | message.guild.member(user).addRole(subscriberRole).then(() => { 7 | message.channel.send("***You have successfully subscribed! :white_check_mark:***") 8 | }) 9 | } 10 | -------------------------------------------------------------------------------- /commands/avatar.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | let user = message.mentions.users.first() || message.author 5 | const embed = new Discord.RichEmbed() 6 | .setImage(user.displayAvatarURL) 7 | .setColor(0x00A2E8) 8 | message.channel.send({embed}) 9 | } 10 | 11 | -------------------------------------------------------------------------------- /commands/botstatus.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const botstatus = ['Online', 'Idle', 'Do Not Disturb', 'Invisable']; 5 | const embed = new Discord.RichEmbed() 6 | .addField("Bot Status: ", `${botstatus[client.status]}`); 7 | message.channel.send(embed) 8 | } 9 | 10 | -------------------------------------------------------------------------------- /commands/fish.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | const fishes = [':fish:', ':tropical_fish:', ':blowfish:', ':boot:']; 5 | const fish = fishes[Math.floor(Math.random() * fishes.length)]; 6 | message.channel.send(`:fishing_pole_and_fish: You went fishing and caught a ${fish}`); 7 | } 8 | 9 | -------------------------------------------------------------------------------- /commands/serveremojis.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const emoji = message.guild.emojis; 5 | if (!emoji.size) return message.channel.send("Server has no emojis") 6 | const embed = new Discord.RichEmbed() 7 | .addField("Server Emojis", emoji.map((e) => e).join(' ')) 8 | message.channel.send({embed}) 9 | } 10 | 11 | -------------------------------------------------------------------------------- /commands/embed.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const word = args.join(" ") 5 | if (word < 1) return message.channel.send("Didn't provide any text to embed") 6 | const embed = new Discord.RichEmbed() 7 | .setDescription(word) 8 | .setColor(0x00A2E8); 9 | message.channel.send({embed}); 10 | } 11 | 12 | -------------------------------------------------------------------------------- /commands/choose.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const choice1 = args[0] 5 | const choice2 = args.slice(1).join(" ") 6 | if (choice2 < 1) return message.channel.send("Didnt provide a second option to choose from.") 7 | var choices = [`${choice1}`, `${choice2}`] 8 | message.channel.send(`I choose ${choices[Math.floor(Math.random() * choices.length)]}!`); 9 | } -------------------------------------------------------------------------------- /commands/rr.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | var roulette = [':gun: Pow! You are dead , try again?',':gun: Luckily for yourself, ***you survived***! Would you like to test your luck again ?',':gun: Oh darn, it didnt shoot! Or Is that a good thing? (Try Again)']; 5 | message.channel.send(roulette[Math.floor(Math.random () * roulette.length)]); 6 | } 7 | 8 | -------------------------------------------------------------------------------- /commands/weeb.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const superagent = require('superagent'); 4 | exports.run = async (client, message, args) => { 5 | const { body } = await superagent 6 | .get('https://nekos.life/api/neko'); 7 | const embed = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .setImage(body.neko) 10 | message.channel.send(embed) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /commands/invite.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | message.channel.send("Here's a invite link to invite the bot to your server, see you there!") 5 | const embed = new Discord.RichEmbed() 6 | .setColor(0x00A2E8) 7 | .setDescription(`https://discordapp.com/oauth2/authorize?client_id=390151520722878465&scope=bot&permissions=470281471`); 8 | message.channel.send({embed}) 9 | } -------------------------------------------------------------------------------- /commands/sexyrate.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const sexyrate = Math.floor(Math.random() * 100) 5 | const embed = new Discord.RichEmbed() 6 | .addField(":heart_decoration: Sexy Rate :heart_decoration: ", "I rate you a " + sexyrate + " out of 100 on the sexy scale") 7 | .setThumbnail(message.author.displayAvatarURL) 8 | message.channel.send({embed}) 9 | } -------------------------------------------------------------------------------- /commands/setstatus.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (message.author.id == "130515926117253122") { 5 | var argresult = args.join(' '); 6 | client.user.setStatus(argresult); 7 | message.reply("It has been set!"); 8 | } else { 9 | message.reply("You do not have the permissions. Creator of the bot only. :x:"); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /commands/math.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const math = require('mathjs'); 4 | exports.run = async (client, message, args) => { 5 | const expression = args.join(" "); 6 | try { 7 | const solved = math.eval(expression).toString(); 8 | return message.channel.send("The answer is: " + solved); 9 | } catch (err) { 10 | return message.channel.send('An error happened, more details: ' + err); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /commands/setgame.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | if (message.author.id == "130515926117253122") { 5 | var gametoset = args.join(' '); 6 | if (!gametoset) gametoset = null; 7 | client.user.setGame(gametoset); 8 | message.reply("The new game has been set!"); 9 | } else { 10 | message.reply("You do not have the substancial permissions. Creator of the bot only. :x:"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /commands/animtableflip.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const frames = [ 4 | '(-°□°)- ┬─┬', 5 | '(╯°□°)╯ ]', 6 | '(╯°□°)╯ ︵ ┻━┻', 7 | '(╯°□°)╯ [', 8 | '(╯°□°)╯ ┬─┬' 9 | ]; 10 | exports.run = async (client, message, args) => { 11 | const msg = await message.channel.send('(\\\\°□°)\\\\ ┬─┬'); 12 | for (const frame of frames) { 13 | setTimeout(() => {}, 4000); 14 | await msg.edit(frame); 15 | } 16 | return message; 17 | } -------------------------------------------------------------------------------- /commands/advice.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const { body } = await snekfetch.get('http://api.adviceslip.com/advice'); 7 | message.channel.send(JSON.parse(body.toString()).slip.advice); 8 | } catch (err) { 9 | message.channel.send(`An error occurred: \`${err.message}\`. Try again later!`); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /commands/lmgtfy.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | let autogoogle = args.join('+'); 5 | if (autogoogle.length < 1) return message.reply('You must supply a LMGTFY.').catch(console.error); 6 | const embed = new Discord.RichEmbed() 7 | .setColor(0x738BD7) 8 | .setDescription(`Here you go, **${message.author.username}**: http://lmgtfy.com/?q=` + (args.join('+'))) 9 | message.channel.send({embed}) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /commands/credits.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const embed = new Discord.RichEmbed() 5 | .setColor(0x00A2E8) 6 | .addField("Developer", "Mr. Robot#0101, YorkAARGH, dragonfire535") 7 | .addField("Special thanks too:", `EthericDestruction#7890 \nAndrew#0307 \nN'Zoth#2769 \nSaorax ツ#9242`) 8 | .setTimestamp() 9 | .setFooter(client.user.username, client.user.avatarURL); 10 | message.channel.send({embed}) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /commands/yoda.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | const speech = args.join(' '); 6 | if (speech.length < 2) return message.channel.send(`${message.author.username} You must supply text for Yoda. Yes.`); 7 | const { text } = await snek.get(`http://yoda-api.appspot.com/api/v1/yodish?text=${encodeURIComponent(speech.toLowerCase())}`); 8 | message.channel.send(JSON.parse(text).yodish).catch(console.error); 9 | } 10 | -------------------------------------------------------------------------------- /commands/dog.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | const superagent = require("superagent"); 5 | const { body } = await superagent 6 | .get('https://random.dog/woof.json'); 7 | const embed = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .setImage(body.url) 10 | if (body.url.includes(".mp4")) return; // As mp4s cant really be set as a image for a embed and will cause a error in the console 11 | message.channel.send({embed}) 12 | } 13 | -------------------------------------------------------------------------------- /commands/hentai.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | const { body } = await snekfetch 6 | .get('https://nekos.life/api/lewd/neko') 7 | 8 | if (!message.channel.nsfw) return message.channel.send("Cannot send NSFW content in a SFW channel.") 9 | const embed = new Discord.RichEmbed() 10 | .setImage(body.neko) 11 | message.channel.send(embed).catch(console.error); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /commands/roll.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | const value = parseInt(args.join(" ")); 5 | if (isNaN(value)) return message.channel.send("Not a valid number to roll") 6 | if (!isFinite(value)) return message.channel.send("Can not roll infinite") 7 | isFinite 8 | const roll = Math.floor(Math.random() * value) + 1; 9 | const embed = new Discord.RichEmbed() 10 | .addField("The dice rolled", roll) 11 | .setColor(0x00A2E8) 12 | message.channel.send({embed}) 13 | } 14 | -------------------------------------------------------------------------------- /commands/uptime.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const moment = require('moment'); 3 | require('moment-duration-format'); 4 | exports.run = (client, message, args) => { 5 | try { 6 | const embed = new Discord.RichEmbed() 7 | .setTitle("Bot Uptime") 8 | .addField('Uptime:', moment.duration(client.uptime).format('d [days], h [hours], m [minutes], s [seconds]', { trim: "small" }), true) 9 | .setColor(0x00A2E8) 10 | message.channel.send(embed) 11 | } catch (err) { 12 | message.channel.send(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /commands/changelog.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const embed = new Discord.RichEmbed() 5 | .setAuthor(client.user.username, client.user.avatarURL) 6 | .setColor(0x00A2E8) 7 | .setTitle("Changelog v0.9.4") 8 | .addField("Changes", "- Added meme\n- Added showerthoughts\n- Added choose \n- Improvements to warnings system\n- Fixed other small bugs") 9 | .setTimestamp() 10 | .setFooter(client.user.username, client.user.avatarURL); 11 | message.channel.send({embed}) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /commands/cat.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch') 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const { body, headers } = await snekfetch 7 | .get('http://thecatapi.com/api/images/get') 8 | .query({ api_key: 'APIKEY' }); 9 | const format = headers['content-type'].replace(/image\//i, ''); 10 | return message.channel.send({ files: [{ attachment: body, name: `cat.${format}` }] }); 11 | } catch (err) { 12 | return message.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /assets/handlers/createDb.js: -------------------------------------------------------------------------------- 1 | const sql = require("sqlite"); 2 | sql.open("./assets/guildsettings.sqlite"); 3 | 4 | module.exports = { 5 | createSQLDb: () => { 6 | sql.run("CREATE TABLE IF NOT EXISTS scores (guildId TEXT, prefix TEXT, casenumber INTEGER, autoroleenabled TEXT, roletogive TEXT, logsenabled TEXT, logschannel TEXT, automoderation TEXT, wlchannel TEXT, wlsystem TEXT, welcomemessage TEXT, leavemessage TEXT, dmmessage TEXT, slowmode TEXT, slowmodetime INTEGER, invitelinkprotection TEXT, websitelinkprotection TEXT, dupcharactersprotection TEXT, antijoin TEXT, modonlycommands TEXT, botlock TEXT, botlockchannel TEXT, levelsystem TEXT)") 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /commands/cb.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const Cleverbot = require('cleverio'); 4 | const clevs = new Cleverbot.Client({ 5 | key: "J3tNu0VNfJjjv9LmFNZxSqF2KtDY2gAl", 6 | user: "P34kgHyXaw5G2CSS", 7 | nick: "orcinus" 8 | }); 9 | exports.run = async (client, message, args) => { 10 | try { 11 | clevs.create(); 12 | const text = args.join(" ") 13 | const { response } = await clevs.ask(text); 14 | message.channel.send(response); 15 | } catch (err) { 16 | console.log(err) 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | 24 | 25 | **Additional context** 26 | Add any other context about the problem here. 27 | -------------------------------------------------------------------------------- /commands/donate.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | let embed = new Discord.RichEmbed() 5 | .setThumbnail("http://logok.org/wp-content/uploads/2014/05/Paypal-logo-pp-2014.png") 6 | .setDescription("Thank you for considering donating, the bots funding costs A LOT of money, so any bit of money would help our discord bot stay alive, thank you and bot on!") 7 | .setColor(0x00A2E8) 8 | .addField("Paypal Email", "zachary_2000@live.com") 9 | .addField("Patreon", "https://www.patreon.com/orcinusbot") 10 | message.channel.send({embed}); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /commands/cuddle.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't kiss nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got a cuddle from ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "https://i.imgur.com/0yAIWbg.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/pat.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't pat nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got a pat from ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "https://i.imgur.com/oynHZmT.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/poke.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't poke nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got a poke from ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "https://i.imgur.com/XMuJ7K8.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/marry.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't marry nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got married with ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "https://i.imgur.com/u67QLhB.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/punch.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't punch nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got a punch from ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "https://i.imgur.com/R5KBiYV.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/drop-kick.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't drop kick nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got a drop kick from ${message.author.username}`,{ 8 | embed: { 9 | image: { 10 | url: "https://vgy.me/04YbOf.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/fist-bump.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't fist-bump nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got a fist-bump from ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "https://i.imgur.com/lO2xZHC.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/high-five.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't high-five nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got a high-five from ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "https://i.imgur.com/7BJ6gfM.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/divorce.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't divorce nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got divorced with ${message.author.username} :broken_heart:`,{ 8 | embed: { 9 | image: { 10 | url: "https://i.imgur.com/IgvLWaa.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/inventory.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | var dice = Math.floor(Math.random() * 1000); 7 | if (dice <= 500) { 8 | message.channel.send("You got a common chest please wait 24 hours to claim another.") 9 | } else if (dice >= 500 && dice <= 750) { 10 | message.channel.send("You got a uncommon chest please wait 24 hours to claim another.") 11 | } else if (dice >= 751) { 12 | message.channel.send("You got a rare chest please wait 24 hours to claim another.") 13 | } 14 | } -------------------------------------------------------------------------------- /commands/hold-hands.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't hold hands with nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You held hands with ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "https://media.giphy.com/media/TnUJHKyjwHXOM/giphy.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/tackle.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't tackle nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | message.channel.send(`${user} You got a tackle from ${message.author.username} ❤`,{ 8 | embed: { 9 | image: { 10 | url: "http://gifimage.net/wp-content/uploads/2017/07/anime-tackle-hug-gif-12.gif" 11 | } 12 | } 13 | }) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/shortenurl.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | const url = args.join("") 6 | try { 7 | const { body } = await snekfetch 8 | .post('https://www.googleapis.com/urlshortener/v1/url') 9 | .query({ 10 | longUrl: url, 11 | key: "GOOGLEKEY" 12 | }) 13 | .send({ 14 | longUrl: url 15 | }); 16 | message.channel.send(`New url is: ${body.id}`); 17 | } catch (err) { 18 | message.reply(`An error occurred: \`${err.message}\`. Try again later!`); 19 | } 20 | } -------------------------------------------------------------------------------- /commands/hug.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't hug nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | snekfetch.get('https://nekos.life/api/hug') 8 | .set('Key', 'dnZ4fFJbjtch56pNbfrZeSRfgWqdPDgf') 9 | .then(r => message.channel.send(`${user} You got a hug from ${message.author.username} ❤`,{ 10 | embed: { 11 | image: { 12 | url: r.body.url 13 | } 14 | } 15 | })) 16 | } 17 | 18 | -------------------------------------------------------------------------------- /commands/ass.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 5 | const rp = require('request-promise-native') 6 | return rp.get('http://api.obutts.ru/butts/0/1/random').then(JSON.parse).then(function(res) { 7 | return rp.get({ 8 | url:'http://media.obutts.ru/' + res[0].preview, 9 | encoding: null 10 | }); 11 | }).then(function(res) { 12 | if (message.channel.nsfw) return message.channel.send({ files: [{ attachment: res, name: 'ass.png' }] }).catch(console.error); 13 | }); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/botnick.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (!message.member.hasPermission("MANAGE_NICKNAMES")) { 5 | return message.reply("You do not have permission to change the bot's nickname"); 6 | } else { 7 | let username = args.join(' '); 8 | if (username.length < 1) return message.reply('You must supply a name for the client.') 9 | message.guild.members.get('330044809651814412').setNickname(username); 10 | const embed = new Discord.RichEmbed() 11 | .setColor(0x00A2E8) 12 | .addField("Bot username set successfully!", username + " is now the nickname for the bot :white_check_mark:"); 13 | message.reply({embed}) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /commands/tits.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 5 | const rp = require('request-promise-native') 6 | return rp.get('http://api.oboobs.ru/boobs/0/1/random').then(JSON.parse).then(function(res) { 7 | return rp.get({ 8 | url:'http://media.oboobs.ru/' + res[0].preview, 9 | encoding: null 10 | }); 11 | }).then(function(res) { 12 | if (message.channel.nsfw) return message.channel.send({ files: [{ attachment: res, name: 'tits.png' }] }).catch(console.error); 13 | }); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /commands/showerthoughts.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const { body } = await snekfetch 7 | .get('https://www.reddit.com/r/Showerthoughts.json') 8 | .query({ limit: 1000 }); 9 | const allowed = message.channel.nsfw ? body.data.children : body.data.children.filter(post => !post.data.over_18); 10 | if (!allowed.length) return message.channel.send('It seems the shower thoughts are gone right now. Try again later!'); 11 | return message.channel.send(allowed[Math.floor(Math.random() * allowed.length)].data.title); 12 | } catch (err) { 13 | return; 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /commands/wur.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | if (!message.guild.member(client.user).hasPermission('ADD_REACTIONS')) return message.reply('Sorry, i dont have the perms to do this cmd i need ADD_REACTIONS. :x:') 5 | const superagent = require('superagent'); 6 | const { body } = await superagent 7 | .get('http://www.rrrather.com/botapi'); 8 | const embed = new Discord.RichEmbed() 9 | .setTitle(`${body.title} Choice A Or B?`) 10 | .setURL(body.link) 11 | .setColor(0x00A2E8) 12 | .setDescription(`${body.choicea} OR ${body.choiceb}?`); 13 | message.channel.send({embed}).then(m => { 14 | m.react('🅰'); 15 | m.react('🅱'); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /commands/kiss.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require("snekfetch") 4 | exports.run = async (client, message, args) => { 5 | if (message.mentions.users.size < 1) return message.channel.send("you can't kiss nobody") 6 | let user = message.guild.member(message.mentions.users.first()); 7 | snekfetch.get('https://nekos.life/api/kiss') 8 | .set('Key', 'dnZ4fFJbjtch56pNbfrZeSRfgWqdPDgf') 9 | .then(r => message.channel.send(`${user} You got a kiss from ${message.author.username} ❤`,{ 10 | embed: { 11 | image: { 12 | url: r.body.url 13 | } 14 | } 15 | })).catch(console.error); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /commands/today.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | const { text } = await snekfetch 6 | .get('http://history.muffinlabs.com/date'); 7 | const body = JSON.parse(text); 8 | const events = body.data.Events; 9 | const event = events[Math.floor(Math.random() * events.length)]; 10 | const embed = new Discord.RichEmbed() 11 | .setColor(0x00A2E8) 12 | .setURL(body.url) 13 | .setTitle(`On this day (${body.date})...`) 14 | .setTimestamp() 15 | .setDescription(`${event.year}: ${event.text}`); 16 | return message.channel.send(embed).catch(console.error); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /commands/reboot.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | const fs = require("fs"); 3 | exports.run = async (client, message, args) => { 4 | if (message.author.id !== "130515926117253122") return message.channel.send("Only owners can use this command"); 5 | try { 6 | await message.reply('Bot is rebooting.'); 7 | fs.readdir("./commands/", (err, files) => { 8 | const filez = files.length 9 | if (err) return console.error(err); 10 | message.channel.send(`Refreshed \`${filez + 11}\` commands successfully!`) 11 | console.log("Refreshed " + filez + " commands") 12 | files.forEach(file => { 13 | delete require.cache[require.resolve(`./${file}`)]; 14 | }); 15 | }); 16 | process.exit(1); 17 | } catch (e) { 18 | console.log(e); 19 | } 20 | } -------------------------------------------------------------------------------- /commands/suggestion.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (!message.guild.member(client.user).hasPermission('ADD_REACTIONS')) return message.reply('Sorry, i dont have the perms to do this cmd i need ADD_REACTIONS. :x:') 5 | const sayMessage = args.join(" "); 6 | if (sayMessage.length < 1) return message.channel.send("Didn't provide a suggestion!") 7 | const embed = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .addField("Suggestion:", `**${sayMessage}**!`) 10 | .setFooter("Suggestion by " + message.author.username, message.author.avatarURL) 11 | .setTimestamp() 12 | message.channel.send({embed}).then(m => { 13 | m.react('⬆'); 14 | m.react('⬇'); 15 | }) 16 | } 17 | 18 | -------------------------------------------------------------------------------- /commands/currency.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | const base = args[0]; 6 | const to = args[1]; 7 | const amount = args[2] 8 | if (base === to) return message.channel.send(`Converting ${base} to ${to} is the same value, dummy.`); 9 | const { body } = await snekfetch 10 | .get('http://api.fixer.io/latest') 11 | .query({ 12 | base, 13 | symbols: to 14 | }); 15 | const tofixed = parseFloat(amount).toFixed(2) 16 | const tofixed2 = parseFloat(body.rates[to]).toFixed(2) 17 | message.channel.send(`$${tofixed} ${base} is $${tofixed * tofixed2} ${to}.`).catch(console.error); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /commands/poll.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (!message.guild.member(client.user).hasPermission('ADD_REACTIONS')) return message.reply('Sorry, i dont have the perms to do this cmd i need ADD_REACTIONS. :x:') 5 | const sayMessage = args.join(" "); 6 | if (sayMessage.length < 1) return message.channel.send("Didnt provide anything for the poll.") 7 | if (message.member.hasPermission("KICK_MEMBERS")) { 8 | const embed = new Discord.RichEmbed() 9 | .setColor(0x00A2E8) 10 | .setTitle(" Poll ") 11 | .setDescription(`A poll has begun! The poll is: "**${sayMessage}**"!, vote now!`) 12 | message.channel.send(embed).then(m => { 13 | m.react('✅'); 14 | m.react('❌'); 15 | }) 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /commands/clean.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (!message.member.permissions.has("MANAGE_MESSAGES")) return message.channel.send("Sorry, you do not have permission to perform the clean command."); 5 | let num = (!!args.slice(0).join(' ')) ? parseInt(args.slice(0).join(' ')) || 99 : 99; 6 | message.channel.fetchMessages({limit:num}).then(messages => { 7 | let ms = messages.filter(m => m.author.id === client.user.id); 8 | if (ms.size === 1) { ms.first().delete(); return message.channel.send("**Orcinus messages have been deleted**") } 9 | if (ms.size < 1) return message.channel.send("**No messages found to clean**") 10 | message.channel.bulkDelete(ms, true).then(() => message.channel.send("**Orcinus messages have been deleted**")) 11 | }) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /commands/rep.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | const talkedRecently = new Set(); 5 | sql.open("./assets/guildsettings.sqlite"); 6 | exports.run = (client, message, args) => { 7 | if (talkedRecently.has(message.author.id)) 8 | return; 9 | 10 | let member = message.mentions.members.first(); 11 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${member.id}"`).then(row => { 12 | if (!row) return 13 | if (row.levelsystem === "disabled") return; 14 | 15 | sql.run(`UPDATE profiles SET rep = ${row.rep += 1} WHERE guildId ="${message.guild.id}" AND userId = ${member.id}`); 16 | message.channel.send("You have repped this user please wait another hour to rep again.") 17 | setTimeout(() => { 18 | // wait 1 hour 19 | }, 60 * 60000); 20 | }) 21 | } -------------------------------------------------------------------------------- /commands/achievement.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | try { 5 | const text = args.join(" "); 6 | if (text === null) return message.channel.send("You need to provide text for the achievement"); 7 | if (text.length > 25) return message.reply('text must be under 25 characters.'); 8 | const superagent = require('superagent') 9 | const { body } = await superagent 10 | .get('https://www.minecraftskinstealer.com/achievement/a.php') 11 | .query({ 12 | i: 1, 13 | h: 'Achievement Get!', 14 | t: text 15 | }); 16 | message.channel.send({ files: [{ attachment: body, name: 'achievement.png' }] 17 | }); 18 | } catch (err) { 19 | console.log(err) 20 | } 21 | } -------------------------------------------------------------------------------- /commands/membercount.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const role = message.guild.roles.size; 5 | const online = (message.guild.members.filter(m => m.presence.status != 'offline').size - message.guild.members.filter(m=>m.user.bot).size) 6 | const embed = new Discord.RichEmbed() 7 | .setAuthor("Servername: " + message.guild.name, message.guild.iconURL) 8 | .setColor(0x00A2E8) 9 | .addField('Members', `${message.guild.memberCount - message.guild.members.filter(m=>m.user.bot).size}`, true) 10 | .addField('Online', `${online}`, true) 11 | .addField("Bots", message.guild.members.filter(m=>m.user.bot).size) 12 | .setTimestamp() 13 | .setFooter(client.user.username, client.user.avatarURL); 14 | message.channel.send({embed}) 15 | } 16 | 17 | -------------------------------------------------------------------------------- /commands/map.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const zoom = args[0] 7 | const location = args.slice(1).join(" ") 8 | const { body } = await snekfetch 9 | .get('https://maps.googleapis.com/maps/api/staticmap') 10 | .query({ 11 | center: location, 12 | zoom, 13 | size: '500x500', 14 | key: "GOOGLE_KEY" 15 | }); 16 | const url = `https://www.google.com/maps/search/${encodeURIComponent(location)}`; 17 | return message.channel.send(`<${url}>`, { files: [{ attachment: body, name: 'map.png' }] }); 18 | } catch (err) { 19 | return message.channel.send(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /commands/roleinfo.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | let roletocheck = args.join(" ") 5 | let role = client.guilds.get(message.guild.id).roles.find('name', roletocheck); 6 | if (!role) return message.channel.send("Role wasnt found in the server.") 7 | //const serialized = role.permissions.serialize(); 8 | //const perms = Object.keys(permissions).filter(perm => serialized[perm]); 9 | const embed = new Discord.RichEmbed() 10 | .setColor(0x00A2E8) 11 | .addField('Role name', `${role.name}`, true) 12 | .addField('Role ID', `${role.id}`, true) 13 | .addField('Created At', role.createdAt.toDateString()) 14 | .addField("Mentionable: ", role.mentionable ? 'Yes' : 'No') 15 | //.addField('Permissions' , perms.map(perm => permissions[perm]).join(', ') || 'None') 16 | message.channel.send({embed}) 17 | } -------------------------------------------------------------------------------- /commands/8ball.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | let reason = args.join(' '); 5 | if (reason.length < 1) return message.channel.send('You did not give the bot a question'); 6 | var ball = ['It is certain.','No doubt about it.','No chance.','Maybe, time will tell.','No way.','Concentrate and try again.', ' As I see it, yes', 'Outlook good', 'Most likely', 'Better not tell you now', 'My sources say no', 'Signs point to yes', 'Yes definitely', 'It is decidedly so', 'As I see it, yes', 'My sources say no', 'My sources say no', 'Outlook not so good', 'Very doubtful']; 7 | const embed = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .addField("You asked", reason) 10 | .addField("Orcinus says", ball[Math.floor(Math.random () * ball.length)]) 11 | .setThumbnail("http://www.pngmart.com/files/3/8-Ball-Pool-Transparent-PNG.png") 12 | message.channel.send({embed}) 13 | } 14 | 15 | -------------------------------------------------------------------------------- /commands/issue.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const talkedRecently = new Set(); 4 | exports.run = (client, message, args) => { 5 | if (talkedRecently.has(message.author.id)) return message.channel.send("You already reported a issue recently please wait another 30mins."); 6 | let feedback = args.join(' '); 7 | if (feedback.length < 10) return message.reply('Feedback is to short minimum of 10 characters.').catch(console.error); 8 | client.users.get("130515926117253122").send("Mr. Robot, a user has reported a issue on the bot: " + feedback + " | Sent in by: " + message.author.username); 9 | message.reply("thanks for reporting a issue/choosing to give feedback it has been sent!") 10 | talkedRecently.add(message.author.id); 11 | setTimeout(() => { 12 | talkedRecently.delete(message.author.id); 13 | }, 30 * 60000); 14 | } 15 | -------------------------------------------------------------------------------- /commands/awards.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const embed2 = new Discord.RichEmbed() 5 | .setColor(0x00A2E8) 6 | .setTitle(" Possible Awards ") 7 | .addField(`:tada: - Reach level 25`, ` + 5,000 money`, true) 8 | .addField(`:medal: - Reach level 50`, `+ 10,000 money`, true) 9 | .addField(`:military_medal: - Reach level 75`, `+ 20,000 money`, true) 10 | .addField(`:trophy:`, `Reach level 100 (max)`, true) 11 | .addBlankField() 12 | .addField(`:first_place: - Reach #1 on the leaderboard`, `+5% winning chance`, false) 13 | .addField(`:moneybag:`, `Earn 10,000 in cash. +1% winning chance`, true) 14 | .addField(`:credit_card:`, `Earn 100,000 in cash. +3% winning chance`, true) 15 | .addBlankField() 16 | .addField(`:spy::skin-tone-1:`, `Secret Award`, true) 17 | .addField(`:tophat: - Secret Award`, ` +`, true) 18 | .addField(`:watch:`, `Secret Award`, true) 19 | .addField(`:tools:`, `Secret Award`, true) 20 | message.channel.send(embed2) 21 | } 22 | 23 | -------------------------------------------------------------------------------- /commands/funnyNSFW.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | const { promisifyAll } = require('tsubaki'); 5 | const xml = promisifyAll(require('xml2js')); 6 | exports.run = async (client, message, args) => { 7 | if (!message.channel.nsfw) return message.channel.send("Cannot send NSFW content in a SFW channel.") 8 | const { body } = await snekfetch 9 | .get('https://www.reddit.com/r/NSFWfunny.json?sort=top&t=week') 10 | .query({ limit: 800 }); 11 | const allowed = !message.channel.nsfw ? body.data.children : body.data.children.filter(post => post.data.over_18); 12 | if (!allowed.length) return message.channel.send('It seems we are out of fresh images for you!, Try again later.'); 13 | const randomnumber = Math.floor(Math.random() * allowed.length) 14 | const embed = new Discord.RichEmbed() 15 | .setColor(0x00A2E8) 16 | .setTitle(allowed[randomnumber].data.title) 17 | .setImage(allowed[randomnumber].data.url) 18 | message.channel.send(embed) 19 | } 20 | 21 | -------------------------------------------------------------------------------- /License: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /commands/settings.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 7 | const embed = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .setTitle("Guild settings") 10 | .addField("General", `Prefix: ${row.prefix}`) 11 | .addField("Messages", `Welcome message: ${row.welcomemessage} \nLeave message: ${row.leavemessage}`) 12 | .addField("Channels", `Welcome/leave channel: ${row.wlchannel} \nLogs channel: ${row.logschannel}`) 13 | .addField("Moderation", `Anti invite: ${row.invitelinkprotection} \nAnti website link: ${row.websitelinkprotection} \nAnti dup characters: ${row.dupcharactersprotection} \nSlowmode: ${row.slowmode} \nMod only commands: ${row.modonlycommands}`) 14 | .addField("Misc", `Anti join: ${row.antijoin} \nAutorole: ${row.autoroleenabled}\nProfile/Level/Cash system: ${row.levelsystem}`); 15 | message.channel.send(embed) 16 | }) 17 | } -------------------------------------------------------------------------------- /commands/redeem.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | var y = ""; 6 | exports.run = async (client, message, args) => { 7 | try { 8 | const redeemcode = args.join("") 9 | if (redeemcode === "free10k") { 10 | if (y.includes(message.author.id)) return message.channel.send("You have already redeemed this code, follow orcinus on twitter for more codes: \nhttps://twitter.com/OrcinusBot") 11 | y += `${message.author.id}, `; 12 | console.log(y) 13 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 14 | sql.run(`UPDATE profiles SET cash = ${row.cash += 10000} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 15 | message.channel.send("Code has been redeemed i have added 10k to your cash, see https://twitter.com/OrcinusBot for more codes") 16 | }) 17 | } 18 | } catch (err) { 19 | message.channel.send("Error happened please report this to the dev: " + err) 20 | } 21 | } -------------------------------------------------------------------------------- /commands/takexp.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | const user = message.mentions.users.first(); 7 | if (message.mentions.users.size < 1) return message.channel.send("Need to tag a user to take xp from them."); 8 | const amount = parseInt(args[1]); 9 | if (amount < 1) return message.channel.send("Didnt provide any money to give."); 10 | if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("Need MANAGE_GUILD permission to use this command.") 11 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${user.id}"`).then(row => { 12 | if (!row) message.channel.send("User needs to start talking first.") 13 | if (isNaN(amount)) return message.channel.send("Not a valid number") 14 | sql.run(`UPDATE profiles SET xp = ${row.xp -= amount} WHERE guildId ="${message.guild.id}" AND userId = ${user.id}`); 15 | message.channel.send("I have taken xp from: " + user.username + " " + amount + "XP"); 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /commands/mdn.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const query = args.join(" ") 7 | const { body } = await snekfetch 8 | .get('https://developer.mozilla.org/en-US/search.json') 9 | .query({ 10 | q: query, 11 | locale: 'en-US', 12 | highlight: false 13 | }); 14 | if (!body.documents.length) return message.channel.send('Could not find any results.'); 15 | const data = body.documents[0]; 16 | const embed = new Discord.RichEmbed() 17 | .setColor(0x066FAD) 18 | .setAuthor('Mozilla Developer Network', 'https://i.imgur.com/DFGXabG.png', 'https://developer.mozilla.org/') 19 | .setURL(data.url) 20 | .setTitle(data.title) 21 | .setDescription(data.excerpt); 22 | return message.channel.send(embed); 23 | } catch (err) { 24 | return message.channel.send(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); 25 | } 26 | } -------------------------------------------------------------------------------- /commands/takemoney.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | const user = message.mentions.users.first(); 7 | if (message.mentions.users.size < 1) return message.channel.send("Need to tag a user to take money from them."); 8 | const amount = parseInt(args[1]); 9 | if (amount < 1) return message.channel.send("Didnt provide any money to give."); 10 | if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("Need MANAGE_GUILD permission to use this command.") 11 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${user.id}"`).then(row => { 12 | if (!row) message.channel.send("User needs to start talking first.") 13 | if (isNaN(amount)) return message.channel.send("Not a valid number") 14 | sql.run(`UPDATE profiles SET cash = ${row.cash -= amount} WHERE guildId ="${message.guild.id}" AND userId = ${user.id}`); 15 | message.channel.send("I have taken money from: " + user.username + " $" + amount); 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /commands/work.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | const talkedRecently = new Set(); 6 | exports.run = (client, message, args) => { 7 | if (talkedRecently.has(message.author.id)) return message.channel.send("You already worked in the last 10 mins please wait.") 8 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 9 | if (!row) return; 10 | var dice = Math.floor(Math.random() * 120 + 1); 11 | sql.run(`UPDATE profiles SET cash = ${row.cash += dice} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 12 | message.channel.send("You worked for the day and earned: $" + dice +", new balance: $" + row.cash + ", you can work again in 10 minutes.") 13 | talkedRecently.add(message.author.id); 14 | setTimeout(() => { 15 | talkedRecently.delete(message.author.id); 16 | }, 10 * 60000); 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /commands/reddit.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | const subreddit = args.join(" ") || 'random' 6 | const subRedCat = args.slice(1).join(" ") || 'random' 7 | const { body } = await snekfetch 8 | .get(`https://www.reddit.com/r/${subreddit}/${subRedCat}.json`) 9 | 10 | if (!message.channel.nsfw && meme.over_18) return message.channel.send("🔞 Cannot display NSFW content in a SFW channel."); 11 | let meme; 12 | if (body[0]) { 13 | meme = body[0].data.children[Math.floor(Math.random() * body[0].data.children.length)].data; 14 | } else { 15 | meme = body.data.children[Math.floor(Math.random() * body.data.children.length)].data; 16 | } 17 | await message.channel.send(`${meme.title} submitted by ${meme.author} in ${meme.subreddit_name_prefixed}\nUpvote Ratio ${meme.upvote_ratio}\n${meme.url}`); 18 | const embed = new Discord.RichEmbed() 19 | .setImage(body.neko) 20 | message.channel.send(embed); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /commands/wiki.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const superagent = require('superagent'); 4 | const snekfetch = require('snekfetch'); 5 | exports.run = async (client, message, args) => { 6 | const query = args.join(' '); 7 | const { body } = await snekfetch 8 | .get('https://en.wikipedia.org/w/api.php') 9 | .query({ 10 | action: 'query', 11 | prop: 'extracts', 12 | format: 'json', 13 | titles: query, 14 | exintro: '', 15 | explaintext: '', 16 | redirects: '', 17 | formatversion: 2 18 | }); 19 | if (body.query.pages[0].missing) return message.channel.send('No Results.'); 20 | const embed = new Discord.RichEmbed() 21 | .setColor(0x00A2E8) 22 | .setTitle(body.query.pages[0].title) 23 | .setAuthor('Wikipedia', 'https://i.imgur.com/a4eeEhh.png') 24 | .setDescription(body.query.pages[0].extract.substr(0, 2000).replace(/[\n]/g, '\n\n')); 25 | return message.channel.send(embed).catch(console.error); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /commands/temp.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const base = args[0] 5 | const to = args[1] 6 | const amount = args[2] 7 | if (base === to) { 8 | return message.say(`Converting ${base} to ${to} is the same value.`); 9 | } else if (base === 'celsius') { 10 | if (to === 'fahrenheit') return message.say(`${amount}°C is ${(amount * 1.8) + 32}°F.`); 11 | else if (to === 'kelvin') return message.say(`${amount}°C is ${amount + 273.15}°K.`); 12 | } else if (base === 'fahrenheit') { 13 | if (to === 'celsius') return message.say(`${amount}°F is ${(amount - 32) / 1.8}°C.`); 14 | else if (to === 'kelvin') return message.say(`${amount}°F is ${(amount + 459.67) * (5 / 9)}°K.`); 15 | } else if (base === 'kelvin') { 16 | if (to === 'celsius') return message.say(`${amount}°K is ${amount - 273.15}°C.`); 17 | else if (to === 'fahrenheit') return message.say(`${amount}°K is ${(amount * 1.8) - 459.67}°F.`); 18 | } else { 19 | message.channel.send("There was a error try again.") 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /commands/warnings.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = async (client, message, args) => { 6 | if (message.member.hasPermission("KICK_MEMBERS")) { 7 | if (!message.guild.member(client.user).hasPermission('KICK_MEMBERS')) return message.reply('Sorry, i dont have the perms to do this cmd i need KICK_MEMBERS. :x:') 8 | let reason = args.slice(1).join(' '); 9 | if (message.mentions.users.size < 1) return message.channel.send(`Need to tag a user to see there warnings`) 10 | let user = message.mentions.users.first(); 11 | sql.get(`SELECT * FROM warnings WHERE guildId = "${message.guild.id}" AND userId = "${user.id}"`).then(row => { 12 | if (!row) return message.channel.send(user.username + " has " + `0` + " warning(s)") 13 | if (row.userwarnings === 0) { 14 | message.channel.send(user.username + " has " + `${row.userwarnings - 1}` + " warning(s)") 15 | } else { 16 | message.channel.send(user.username + " has " + `${row.userwarnings - 1}` + " warning(s) \n \nReasons: \n```" + row.reasons + "```") 17 | } 18 | }) 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /commands/youtube.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | const query = args.join(" "); 6 | const { body } = await snekfetch 7 | .get('https://www.googleapis.com/youtube/v3/search') 8 | .query({ 9 | part: 'snippet', 10 | type: 'video', 11 | maxResults: 1, 12 | q: query, 13 | key: "GOOGLEKEY" 14 | }); 15 | if (!body.items.length) return message.channel.send('No results found for ' + query + "."); 16 | const embed = new Discord.RichEmbed() 17 | .setColor(0x00A2E8) 18 | .setTitle(body.items[0].snippet.title) 19 | .setDescription(body.items[0].snippet.description) 20 | .setAuthor(`YouTube - ${body.items[0].snippet.channelTitle}`, 'https://i.imgur.com/hkUafwu.png') 21 | .setURL(`https://www.youtube.com/watch?v=${body.items[0].id.videoId}`) 22 | .setThumbnail(body.items[0].snippet.thumbnails.default.url); 23 | return message.channel.send(embed).catch(console.error); 24 | } 25 | -------------------------------------------------------------------------------- /commands/bill.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to make them beautiful"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_bill.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(325, 150) 14 | .setColor(0x00A2E8) 15 | .addImage(body, 80, 0, 150, 150) 16 | .addImage(plate, 0, 0, 325, 150) 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'bill.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/approved.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them behind bars"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/approved.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(250, 250) 14 | .resetTransformation() 15 | .addImage(body, 0, 0, 250, 250) 16 | .addImage(plate, 0, 0, 250, 250) 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'approved.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/exec.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const { exec } = require('child_process'); 4 | exports.run = async (client, message, args) => { 5 | if(message.author.id !== "130515926117253122") return message.channel.send("Only bot owner can use this command") 6 | 7 | const code = args.join(' '); 8 | if (!code) return message.channel.send('You provided no input are you stupid?'); 9 | exec(code, (error, stdout, stderr) => { 10 | const input = `\`\`\`Bash\n${code}\n\`\`\``; 11 | if (error) { 12 | let output = `\`\`\`Bash\n${error}\n\`\`\``; 13 | const embed = new Discord.RichEmbed() 14 | .setTitle('Execute') 15 | .addField(':inbox_tray: Input', input) 16 | .addField(':x: Error', output) 17 | .setColor(0x00A2E8) 18 | return message.channel.send(embed); 19 | } else { 20 | const output = stderr || stdout; 21 | const output2 = `\`\`\`Bash\n${output}\n\`\`\``; 22 | const embed = new Discord.RichEmbed() 23 | .setTitle('Execute') 24 | .addField(':inbox_tray: Input', input) 25 | .addField(':outbox_tray: Output', output2) 26 | .setColor(0x00A2E8) 27 | return message.channel.send(embed); 28 | } 29 | }); 30 | } -------------------------------------------------------------------------------- /commands/jail.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them behind bars"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_jail.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(250, 250) 14 | .resetTransformation() 15 | .addImage(body, 0, 0, 250, 250) 16 | .addImage(plate, 0, 0, 250, 250) 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'jailed.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/rainbow.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them behind bars"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/rainbow.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(250, 250) 14 | .resetTransformation() 15 | .addImage(body, 0, 0, 250, 250) 16 | .addImage(plate, 0, 0, 250, 250) 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'rainbow.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/rejected.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them behind bars"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/rejected.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(250, 250) 14 | .resetTransformation() 15 | .addImage(body, 0, 0, 250, 250) 16 | .addImage(plate, 0, 0, 250, 250) 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'rejected.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/wasted.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them behind bars"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_wasted.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(300, 300) 14 | .resetTransformation() 15 | .addImage(body, 0, 0, 300, 300) 16 | .addImage(plate, 0, 0, 300, 300) 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'wasted.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/thuglife.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them behind bars"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/thug-life.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(330, 330) 14 | .resetTransformation() 15 | .addImage(body, 0, 0, 330, 330) 16 | .addImage(plate, 0, 0, 330, 330) 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'thuglife.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/trigger.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them behind bars"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_triggered.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(330, 330) 14 | .resetTransformation() 15 | .addImage(body, 0, 0, 330, 330) 16 | .addImage(plate, 0, 250, 330, 80) 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'trigger.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/serverinfo.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | const role = message.guild.roles.size; 5 | const online = message.guild.members.filter(m => m.presence.status != 'offline').size 6 | const verificationLevels = ['None', 'Low', 'Medium', 'Insane', 'Extreme']; 7 | const embed = new Discord.RichEmbed() 8 | .setAuthor(message.guild.name, message.guild.iconURL) 9 | .setColor(0x00A2E8) 10 | .setDescription(`Owner: ${message.guild.owner.user.tag} (${message.guild.owner.id})`) 11 | .addField('Member Count', `${message.guild.memberCount}`, true) 12 | .addField('Online', `${online}`, true) 13 | .addField('Server Region', message.guild.region) 14 | .addField('Created At', message.guild.createdAt.toLocaleString(), true) 15 | .addField("Verification Level: ", `${verificationLevels[message.guild.verificationLevel]}`) 16 | .addField('Voice Channels' , `${message.guild.channels.filter(chan => chan.type === 'voice').size}`) 17 | .addField('Text Channels' , `${message.guild.channels.filter(chan => chan.type === 'text').size}`, true) 18 | .addField('Roles', role, true) 19 | message.channel.send({embed}) 20 | } 21 | -------------------------------------------------------------------------------- /commands/meme.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const { body } = await snekfetch 7 | .get('https://www.reddit.com/r/dankmemes.json?sort=top&t=week') 8 | .query({ limit: 800 }); 9 | const allowed = message.channel.nsfw ? body.data.children : body.data.children.filter(post => !post.data.over_18); 10 | if (!allowed.length) return message.channel.send('It seems we are out of fresh memes!, Try again later.'); 11 | const randomnumber = Math.floor(Math.random() * allowed.length) 12 | const embed = new Discord.RichEmbed() 13 | .setColor(0x00A2E8) 14 | .setTitle(allowed[randomnumber].data.title) 15 | .setDescription("Posted by: " + allowed[randomnumber].data.author) 16 | .setImage(allowed[randomnumber].data.url) 17 | .addField("Other info:", "Up votes: " + allowed[randomnumber].data.ups + " / Comments: " + allowed[randomnumber].data.num_comments) 18 | .setFooter("Memes provided by r/dankmemes") 19 | message.channel.send(embed) 20 | } catch (err) { 21 | return console.log(err); 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /commands/delete.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to delete them"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_delete.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(550, 275) 14 | .setColor(0x00A2E8) 15 | .addRect(0, 0, 634, 675) 16 | .addImage(plate, 0, 0, 550, 275) 17 | .addImage(body, 92, 106, 139, 151) 18 | .toBuffer(); 19 | } 20 | try { 21 | const person = message.mentions.users.first().avatarURL; 22 | const result = await getSlapped(person); 23 | await message.channel.send({ files: [{ attachment: result, name: 'garbagememe.png' }] }); 24 | } catch (error) { 25 | throw error; 26 | } 27 | } -------------------------------------------------------------------------------- /commands/brazzers.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to make them beautiful"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_brazzers.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(634, 675) 14 | .setColor(0x00A2E8) 15 | .addRect(0, 0, 634, 675) 16 | .addImage(body, 0, 0, 634, 675) 17 | .addImage(plate, 233, 485, 384, 245) 18 | .toBuffer(); 19 | } 20 | try { 21 | const person = message.mentions.users.first().avatarURL; 22 | const result = await getSlapped(person); 23 | await message.channel.send({ files: [{ attachment: result, name: 'brazzers.png' }] }); 24 | } catch (error) { 25 | throw error; 26 | } 27 | } -------------------------------------------------------------------------------- /commands/motivate.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const { body } = await snekfetch 7 | .get('https://www.reddit.com/r/GetMotivated.json?sort=top&t=week') 8 | .query({ limit: 800 }); 9 | const allowed = message.channel.nsfw ? body.data.children : body.data.children.filter(post => !post.data.over_18); 10 | if (!allowed.length) return message.channel.send('It seems we are out of fresh memes!, Try again later.'); 11 | const randomnumber = Math.floor(Math.random() * allowed.length) 12 | const embed = new Discord.RichEmbed() 13 | .setColor(0x00A2E8) 14 | .setTitle(allowed[randomnumber].data.title) 15 | .setDescription("Posted by: " + allowed[randomnumber].data.author) 16 | .setImage(allowed[randomnumber].data.url) 17 | .addField("Other info:", "Up votes: " + allowed[randomnumber].data.ups + " / Comments: " + allowed[randomnumber].data.num_comments) 18 | .setFooter("Motivation provided by r/GetMotivated") 19 | message.channel.send(embed) 20 | } catch (err) { 21 | return console.log(err); 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /commands/shit.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to make them shit"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_shit.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(634, 775) 14 | .setColor(0x00A2E8) 15 | .addRect(0, 0, 434, 675) 16 | .addImage(plate, 0, 0, 634, 775) 17 | .addImage(body, 200, 505, 169, 169, { type: 'round', radius: 85 }) 18 | .toBuffer(); 19 | } 20 | try { 21 | const person = message.mentions.users.first().avatarURL; 22 | const result = await getSlapped(person); 23 | await message.channel.send({ files: [{ attachment: result, name: 'shit.png' }] }); 24 | } catch (error) { 25 | throw error; 26 | } 27 | } -------------------------------------------------------------------------------- /commands/nick.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (!message.member.hasPermission("MANAGE_NICKNAMES")) return message.reply("You do not have permission to change the bot's nickname"); 5 | if (!message.guild.member(client.user).hasPermission('MANAGE_NICKNAMES')) return message.reply('Sorry, i dont have the perms to do this cmd i need MANAGE_NICKNAMES. :x:') 6 | if (message.mentions.users.size < 1) return message.reply('You must mention someone to change the users nickname. :x:') 7 | let user = message.guild.member(message.mentions.users.first()); 8 | if (user.highestRole.position >= message.member.highestRole.position ) return message.reply('I cant change that members nickname. They are the same level as you or higher. :x:'); 9 | let newusername = args.slice(1).join(' ') 10 | if (newusername.length < 1) return message.reply('You must supply a new name for the user.') 11 | message.guild.members.get(user.user.id).setNickname(newusername); 12 | const embed = new Discord.RichEmbed() 13 | .setColor(0x00A2E8) 14 | .addField("Username set successfully!", newusername + " is now the nickname for " + user.user.username + " :white_check_mark:"); 15 | message.reply({embed}) 16 | } 17 | -------------------------------------------------------------------------------- /commands/tattoo.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them as a tattoo"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_tattoo.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(684, 825) 14 | .setColor(0x00A2E8) 15 | .addRect(0, 0, 434, 675) 16 | .addImage(plate, 0, 0, 684, 825) 17 | .addImage(body, 200, 505, 271, 271, { type: 'round', radius: 125 }) 18 | .toBuffer(); 19 | } 20 | try { 21 | const person = message.mentions.users.first().avatarURL; 22 | const result = await getSlapped(person); 23 | await message.channel.send({ files: [{ attachment: result, name: 'shit.png' }] }); 24 | } catch (error) { 25 | throw error; 26 | } 27 | } -------------------------------------------------------------------------------- /commands/beautiful.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to make them beautiful"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_beautiful.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(634, 675) 14 | .setColor(0x00A2E8) 15 | .addRect(0, 0, 634, 675) 16 | .addImage(body, 423, 45, 168, 168) 17 | .addImage(body, 426, 382, 168, 168) 18 | .addImage(plate, 0, 0, 634, 675) 19 | .toBuffer(); 20 | } 21 | try { 22 | const person = message.mentions.users.first().avatarURL; 23 | const result = await getSlapped(person); 24 | await message.channel.send({ files: [{ attachment: result, name: 'beautiful.png' }] }); 25 | } catch (error) { 26 | throw error; 27 | } 28 | } -------------------------------------------------------------------------------- /commands/rip.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to respect them"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/image_respects.png'); 11 | const png = person.replace(/\.(gif|jpg|png|jpeg)\?size=2048/g, '.png?size=128'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(720, 405) 14 | .addRect(0, 0, 720, 405) 15 | .setColor('#000000') 16 | .addImage(body, 110, 45, 90, 90) 17 | .resetTransformation() 18 | .addImage(plate, 0, 0, 720, 405) 19 | .toBuffer(); 20 | } 21 | try { 22 | const person = message.mentions.users.first().avatarURL; 23 | const result = await getSlapped(person); 24 | await message.channel.send({ files: [{ attachment: result, name: 'rip.png' }] }); 25 | } catch (error) { 26 | throw error; 27 | } 28 | } -------------------------------------------------------------------------------- /commands/deposit.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | let transferamount = parseInt(args[0]); 7 | if (transferamount <= 1) return message.channel.send("You can't deposit anything below 1"); 8 | if (isNaN(transferamount)) return message.channel.send("Not a valid number to deposit"); 9 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 10 | if (!row) return message.channel.nend("Have no cash to deposit need to start talking first.") 11 | if (row.cash < transferamount) return message.channel.send("You dont have enough money to deposit that much, you have: $" + row.cash); 12 | sql.run(`UPDATE profiles SET cash = ${row.cash -= transferamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 13 | sql.run(`UPDATE profiles SET bank = ${row.bank += transferamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 14 | message.channel.send("I have successfully deposited $" + transferamount + ", to your bank, New balance: $" + row.cash + ".") 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /commands/power.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to put them behind bars"); 9 | const getSlapped = async (person) => { 10 | const plate = await fsn.readFile('./assets/images/plate_power.png'); 11 | const png = person.replace('.gif', '.png'); 12 | const { body } = await snek.get(png); 13 | return new Canvas(720, 536) 14 | .resetTransformation() 15 | .addImage(plate, 0, 0, 720, 536) 16 | .addImage(body, 350, 50, 154, 154, { type: 'round', radius: 76 }) // second number controls height ^ first number controls left to right <-> 17 | .toBuffer(); 18 | } 19 | try { 20 | const person = message.mentions.users.first().avatarURL; 21 | const result = await getSlapped(person); 22 | await message.channel.send({ files: [{ attachment: result, name: 'rejected.png' }] }); 23 | } catch (error) { 24 | throw error; 25 | } 26 | } -------------------------------------------------------------------------------- /commands/eval.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | if(message.author.id !== "130515926117253122") return message.channel.send("Only bot owner can use this command") 5 | try { 6 | var code = args.join(" "); 7 | if (code === "client.token") return message.channel.send("Dont wanna do that 0_0") 8 | var evaled = eval(code); 9 | 10 | if (typeof evaled !== "string") 11 | evaled = require("util").inspect(evaled); 12 | 13 | const embed = new Discord.RichEmbed() 14 | .setColor(0x00A2E8) 15 | .addField(":inbox_tray: Input: ", `\`\`\`${code}\`\`\``) 16 | .addField(":outbox_tray: output: ", `\`\`\`js\n${clean(evaled)}\n\`\`\``) 17 | message.channel.send({embed}) 18 | } catch (err) { 19 | const embed = new Discord.RichEmbed() 20 | .setColor(0x00A2E8) 21 | .addField(":inbox_tray: Input: ", `\`\`\`${code}\`\`\``) 22 | .addField(":outbox_tray: output: ", `\`\`\`${clean(err)}\`\`\``) 23 | message.channel.send({embed}) 24 | } 25 | 26 | function clean(text) { 27 | if (typeof(text) === 'string') 28 | return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203)); 29 | else 30 | return text; 31 | } 32 | } -------------------------------------------------------------------------------- /commands/textflip.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const { letterTrans } = require('custom-translate'); 4 | exports.run = (client, message, args) => { 5 | var dictionary = { 6 | "a": "ɐ", 7 | "b": "q", 8 | "c": "ɔ", 9 | "d": "p", 10 | "e": "ǝ", 11 | "f": "ɟ", 12 | "g": "ƃ", 13 | "h": "ɥ", 14 | "i": "ᴉ", 15 | "j": "ɾ", 16 | "k": "ʞ", 17 | "m": "ɯ", 18 | "n": "u", 19 | "p": "d", 20 | "q": "b", 21 | "r": "ɹ", 22 | "t": "ʇ", 23 | "u": "n", 24 | "v": "ʌ", 25 | "w": "ʍ", 26 | "y": "ʎ", 27 | "A": "∀", 28 | "C": "Ɔ", 29 | "E": "Ǝ", 30 | "F": "Ⅎ", 31 | "G": "פ", 32 | "J": "ſ", 33 | "L": "˥", 34 | "M": "W", 35 | "P": "Ԁ", 36 | "T": "┴", 37 | "U": "∩", 38 | "V": "Λ", 39 | "W": "M", 40 | "Y": "⅄", 41 | "1": "Ɩ", 42 | "2": "ᄅ", 43 | "3": "Ɛ", 44 | "4": "ㄣ", 45 | "5": "ϛ", 46 | "6": "9", 47 | "7": "ㄥ", 48 | "9": "6", 49 | ",": "'", 50 | ".": "˙", 51 | "'": ",", 52 | "\"": ",,", 53 | "_": "‾", 54 | "&": "⅋", 55 | "!": "¡", 56 | "?": "¿", 57 | "`": "," 58 | } 59 | const text = args.join(' '); 60 | const converted = letterTrans(text, dictionary); 61 | message.channel.send(converted); 62 | } 63 | 64 | -------------------------------------------------------------------------------- /commands/nytimes.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const query = args.join(" ") 7 | if (query < 1) return message.channel.send("Need to provide something to search for.") 8 | const fetch = snekfetch 9 | .get('https://api.nytimes.com/svc/search/v2/articlesearch.json') 10 | .query({ 11 | 'api-key': "NYTIMESKEY", 12 | sort: 'newest' 13 | }); 14 | if (query) fetch.query({ q: query }); 15 | const { body } = await fetch; 16 | if (!body.response.docs.length) return message.say('Could not find any results'); 17 | const data = body.response.docs[Math.floor(Math.random() * body.response.docs.length)]; 18 | const embed = new Discord.RichEmbed() 19 | .setColor(0x00A2E8) 20 | .setAuthor('New York Times', 'https://i.imgur.com/ZbuTWwO.png', 'https://www.nytimes.com/') 21 | .addField('Publish Date', new Date(data.pub_date).toDateString(), true) 22 | .setURL(data.web_url) 23 | .setTitle(data.headline.main) 24 | .setDescription(data.snippet); 25 | return message.channel.send(embed); 26 | } catch (err) { 27 | return; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /commands/clearwarns.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (message.member.hasPermission("KICK_MEMBERS")) { 7 | try { 8 | if (!message.guild.member(client.user).hasPermission('KICK_MEMBERS')) return message.reply('Sorry, i dont have the perms to do this cmd i need KICK_MEMBERS. :x:') 9 | let reason = args.slice(1).join(' '); 10 | if (message.mentions.users.size < 1) return message.channel.send(`Need to tag a user to see there warnings`) 11 | let user = message.mentions.users.first(); 12 | sql.get(`SELECT * FROM warnings WHERE guildId = "${message.guild.id}" AND userId = "${user.id}"`).then(row => { 13 | if (!row) return message.channel.send(user.username + " has " + `0` + " warning(s)") 14 | if (row.userwarnings === 0) { 15 | message.channel.send(user.username + " has " + row.userwarnings + " warning(s).") 16 | } else { 17 | sql.run(`DELETE FROM warnings WHERE guildId = "${message.guild.id}" AND userId = "${user.id}"`) 18 | message.channel.send(user.username + " " + `${row.userwarnings - 1}` + " warning(s) have been removed.") 19 | } 20 | }) 21 | } catch (err) { 22 | message.channel.send("A error happened oops, more details: " + err + " report this to the dev.") 23 | } 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /commands/withdraw.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | let transferamount = parseInt(args[0]); 7 | if (transferamount <= 1) return message.channel.send("You can't withdraw anything below 1"); 8 | if (isNaN(transferamount)) return message.channel.send("Not a valid number to withdraw"); 9 | let taxtransfer = (transferamount / 100) * 95; 10 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 11 | if (!row) return message.channel.nend("Have no money in the bank to withdraw need to start talking first.") 12 | if (row.bank < transferamount) return message.channel.send("You dont have enough money to withdraw that much, you have: $" + row.bank); 13 | sql.run(`UPDATE profiles SET cash = ${row.cash += taxtransfer} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 14 | sql.run(`UPDATE profiles SET bank = ${row.bank -= transferamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 15 | message.channel.send("I have successfully withdrawal $" + taxtransfer + ", from your bank, there was a 5% fee your new balance: $" + row.cash + ".") 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /commands/anime.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const Kitsu = require('kitsu'); 4 | const kitsu = new Kitsu(); 5 | exports.run = async (client, message, args) => { 6 | const params = args.join(" ") 7 | if (params.length < 1) return message.reply('You must add a anime to search for'); 8 | let msg = await message.channel.send('*fetching information from kitsu!*'); 9 | try { 10 | const { data } = await kitsu.fetch('anime', { filter: { text: params.join('-') } }); 11 | const collected = await message.channel.awaitMessages(filter, { 12 | max: 1, 13 | maxMatches: 1, 14 | time: 60000, 15 | errors: ['time'] 16 | }); 17 | const returnMessage = collected.first(); 18 | await returnMessage.delete(); 19 | const index = Number(returnMessage.content) - 1; 20 | await msg.edit(`**Title JP:** ${data[index].titles.en_jp}\n**Title English:** ${data[index].titles.en}\n**Type:** ${data[index].subtype}\n**Start Date:** ${data[index].startDate}\n**End Date:** ${data[index].endDate || 'in Progress'}\n**PopularityRank:** ${data[index].popularityRank}\n**Link:** \n**Synopsis:** ${data[index].synopsis}`); 21 | } catch (error) { 22 | await msg.edit('I had a error while trying to fetch the data from Kitsu Sorry! did you spell the Anime name right?'); 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /commands/urban.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | const types = ['top']; 5 | exports.run = async (client, message, args) => { 6 | const word = args.join(" ") 7 | try { 8 | const { body } = await snekfetch 9 | .get('http://api.urbandictionary.com/v0/define') 10 | .query({ term: word }); 11 | if (!body.list.length) return message.channel.send('Could not find any results.'); 12 | const data = body.list[types === 'top' ? 0 : Math.floor(Math.random() * body.list.length)]; 13 | const embed = new Discord.RichEmbed() 14 | .setColor(0x32A8F0) 15 | .setAuthor('Urban Dictionary', 'https://i.imgur.com/Fo0nRTe.png', 'https://www.urbandictionary.com/') 16 | .setURL(data.permalink) 17 | .setTitle(data.word) 18 | .setDescription((data.definition)) 19 | .addField('Example', data.example); 20 | const filtercheck = ["xxx", "porn", "sex", "18+","nsfw", "hentai", "dick", "vagina", "pussy"] 21 | if (filtercheck.some(word2 => data.definition.toLowerCase().includes(word2))) return message.channel.send("Not allowed to search nsfw content."); 22 | if (filtercheck.some(word3 => data.word.toLowerCase().includes(word3))) return message.channel.send("Not allowed to search nsfw content."); 23 | message.channel.send(embed); 24 | } catch (err) { 25 | return message.channel.send(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /events/messageDelete.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | 6 | module.exports = (client, message) => { 7 | if (message.author.bot) return; 8 | if (message.channel.type === 'dm') return; 9 | if (!message.guild.member(client.user).hasPermission('SEND_MESSAGES')) return; 10 | if (!message.guild.member(client.user).hasPermission('VIEW_CHANNEL')) return; 11 | if (!message.guild.member(client.user).hasPermission('READ_MESSAGE_HISTORY')) return; 12 | 13 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 14 | if (row.slowmode === "enabled") return; 15 | if (message.author.bot) return; 16 | if (message.channel.type !== 'text') return; 17 | const description = message.cleanContent 18 | const descriptionfix = description.substr(0, 600); 19 | let guild = message.guild; 20 | let modlog = guild.channels.find(channel => channel.name == row.logschannel); 21 | if (!modlog) return; 22 | const embed = new Discord.RichEmbed() 23 | .setColor(0x00A2E8) 24 | .setThumbnail(message.author.avatarURL) 25 | .addField("Author ", `${message.author.tag} (ID: ${message.author.id})`, true) 26 | .addField("Message Content:", `${descriptionfix}`, true) 27 | .setTimestamp() 28 | .setFooter("Message delete in " + message.channel.name); 29 | client.channels.get(modlog.id).send({embed}); 30 | }) 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /commands/ship.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | let user1 = args[0]; 5 | let user2 = args.slice(1).join(' '); 6 | if (!user1) return message.channel.send("You did not select the first item to ship") 7 | if (!user2) return message.channel.send("You did not select the second item to ship") 8 | var ship = Math.floor(Math.random() * 100) + 1; 9 | if (ship <= 50) { 10 | const badmatch = new Discord.RichEmbed() 11 | .setColor(0x00A2E8) 12 | .setTitle(user1 + " and " + user2 + " do not match very well") 13 | .setDescription(":broken_heart: " + ship + "% :broken_heart:"); 14 | message.channel.send(badmatch); 15 | } else if (ship === 100) { 16 | const perfectmatch = new Discord.RichEmbed() 17 | .setColor(0x00A2E8) 18 | .setTitle(user1 + " and " + user2 + " are meant for eachother") 19 | .setDescription(":heart: " + ship + "% :heart:"); 20 | message.channel.send(perfectmatch); 21 | } else { 22 | const match = new Discord.RichEmbed() 23 | .setColor(0x00A2E8) 24 | .setTitle(user1 + " and " + user2 + " match very well") 25 | .setDescription(":heart: " + ship + "% :heart:"); 26 | message.channel.send(match); 27 | } 28 | } -------------------------------------------------------------------------------- /commands/botinfo.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | const fs = require("fs") 6 | const version = "v11.3.2" 7 | exports.run = (client, message, args) => { 8 | fs.readdir("./commands/", (err, files) => { 9 | const filez = files.length 10 | if (err) return console.error(err); 11 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 12 | if (!row) return; 13 | const embed = new Discord.RichEmbed() 14 | .setAuthor(client.user.username, client.user.avatarURL) 15 | .setColor(0x00A2E8) 16 | .addField("Memory", `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}` + "MBS", true) 17 | .addField("Commands:", `${filez + 11}`) 18 | .addField('Total Users', `${client.users.size}`, true) 19 | .addField('Total Channels:', `${client.channels.size}`, true) 20 | .addField('Total Servers', Math.ceil(client.guilds.size), true) 21 | .addField('Bot Created', client.user.createdAt.toLocaleString()) 22 | .addField('Library', `discord.js ${version}`, true) 23 | .addField('Node.js Version', process.version, true) 24 | .addField('Bot Version', "0.9.6.4", true) 25 | .setTimestamp() 26 | .setFooter(client.user.username, client.user.avatarURL); 27 | message.channel.send({embed}) 28 | }) 29 | }) 30 | } 31 | 32 | -------------------------------------------------------------------------------- /commands/slap.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to slap"); 9 | const getSlapped = async (slapper, slapped) => { 10 | const plate = await fsn.readFile('./assets/images/image_slap.png'); 11 | const pngSlapper = slapper.replace('.gif', '.png'); 12 | const pngSlapped = slapped.replace('.gif', '.png'); 13 | const Slapper = await snek.get(pngSlapper); 14 | const Slapped = await snek.get(pngSlapped); 15 | return new Canvas(950, 475) 16 | .addImage(plate, 0, 0, 950, 475) 17 | .addImage(Slapper.body, 410, 107, 131, 131, { type: 'round', radius: 66 }) 18 | .restore() 19 | .addImage(Slapped.body, 159, 180, 169, 169, { type: 'round', radius: 85 }) 20 | .restore() 21 | .toBuffer(); 22 | } 23 | try { 24 | const slapped = message.mentions.users.first().avatarURL; 25 | const slapper = message.author.avatarURL; 26 | const result = await getSlapped(slapper, slapped); 27 | await message.channel.send({ files: [{ attachment: result, name: 'slapped.png' }] }); 28 | } catch (error) { 29 | throw error; 30 | } 31 | } -------------------------------------------------------------------------------- /commands/checkout.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to ch"); 9 | const getSlapped = async (slapper, slapped) => { 10 | const plate = await fsn.readFile('./assets/images/plate_checkout.png'); 11 | const pngSlapper = slapper.replace('.gif', '.png'); 12 | const pngSlapped = slapped.replace('.gif', '.png'); 13 | const Slapper = await snek.get(pngSlapper); 14 | const Slapped = await snek.get(pngSlapped); 15 | return new Canvas(850, 475) 16 | .addImage(plate, 0, 0, 850, 475) 17 | .addImage(Slapper.body, 400, 57, 131, 131, { type: 'round', radius: 66 }) 18 | .restore() 19 | .addImage(Slapped.body, 169, 100, 169, 169, { type: 'round', radius: 85 }) 20 | .restore() 21 | .toBuffer(); 22 | } 23 | try { 24 | const slapped = message.mentions.users.first().avatarURL; 25 | const slapper = message.author.avatarURL; 26 | const result = await getSlapped(slapper, slapped); 27 | await message.channel.send({ files: [{ attachment: result, name: 'slapped.png' }] }); 28 | } catch (error) { 29 | throw error; 30 | } 31 | } -------------------------------------------------------------------------------- /commands/roblox.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch') 4 | exports.run = (client, message, args) => { 5 | let saybot = args.join('_'); 6 | const url = `https://api.roblox.com/users/get-by-username?username=${saybot}`; 7 | snekfetch.get(url).then(result => { 8 | const data = result.body.Id; 9 | if (saybot.length < 1) return message.channel.send("Need to provide a username to use this command") 10 | if (result.body.Id === "undefined") return message.channel.send("Couldn't find a roblox user by the name of " + saybot) 11 | const url2 = `https://api.roblox.com/ownership/hasasset?userId=${data}&assetId=102611803`; 12 | snekfetch.get(url2).then(a => { 13 | const Verifiedcheck = a.body 14 | const embed = new Discord.RichEmbed() 15 | .setColor(0x00A2E8) 16 | .setTitle("Username: " + saybot) 17 | .setDescription("User ID: " + data) 18 | .addField("Verified", Verifiedcheck) 19 | .setFooter("Profile Link: " + `https://web.roblox.com/users/${data}/profile`) 20 | .setThumbnail("https://roblox.com/Thumbs/BCOverlay.ashx?username=" + saybot) 21 | .setImage("http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=" + saybot); 22 | message.channel.send({embed}).catch(console.error); 23 | }) 24 | }) 25 | }; -------------------------------------------------------------------------------- /commands/crush.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to have a crush on them"); 9 | const getSlapped = async (slapper, slapped) => { 10 | const plate = await fsn.readFile('./assets/images/plate_crush.png'); 11 | const pngSlapper = slapper.replace('.gif', '.png'); 12 | const pngSlapped = slapped.replace('.gif', '.png'); 13 | const Slapper = await snek.get(pngSlapper); 14 | const Slapped = await snek.get(pngSlapped); 15 | return new Canvas(600, 873) 16 | .rotate(-0.09) 17 | .addImage(Slapped.body, 109, 454, 417, 417) 18 | .resetTransformation() 19 | .addImage(plate, 0, 0, 600, 873) 20 | .addImage(Slapper.body, 407, 44, 131, 131, { type: 'round', radius: 66 }) 21 | .restore() 22 | .toBuffer(); 23 | } 24 | try { 25 | const slapped = message.mentions.users.first().avatarURL; 26 | const slapper = message.author.avatarURL; 27 | const result = await getSlapped(slapper, slapped); 28 | await message.channel.send({ files: [{ attachment: result, name: 'crush.png' }] }); 29 | } catch (error) { 30 | throw error; 31 | } 32 | } -------------------------------------------------------------------------------- /commands/reason.js: -------------------------------------------------------------------------------- 1 | /*const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | async function embedSan(embed) { 4 | embed.message ? delete embed.message : null; 5 | embed.footer ? delete embed.footer.embed : null; 6 | embed.title ? delete embed.title.embed : null; 7 | embed.provider ? delete embed.provider.embed : null; 8 | embed.thumbnail ? delete embed.thumbnail.embed : null; 9 | embed.image ? delete embed.image.embed : null; 10 | embed.author ? delete embed.author.embed : null; 11 | embed.fields ? embed.fields.forEach(f => {delete f.embed;}) : null; 12 | return embed; 13 | } 14 | exports.run = async (client, message, args) => { 15 | const modlog = client.channels.find('name', 'modlogs'); 16 | const caseNumber = args[0]; 17 | const newReason = args.join(' '); 18 | 19 | await modlog.fetchMessages({limit:100}).then((messages) => { 20 | const caseLog = messages.filter(m => m.author.id === client.user.id && 21 | m.embeds[0] && 22 | m.embeds[0].type === 'rich' && 23 | m.embeds[0].title && 24 | m.embeds[0].title.text.startsWith('Case') && 25 | m.embeds[0].title.text === `Case #${caseNumber}` 26 | ).first(); 27 | modlog.fetchMessage(caseLog.id).then(logMsg => { 28 | const embed = logMsg.embeds[0]; 29 | embedSan(embed); 30 | embed.description = embed.description.replace(`Awaiting moderator's input. Use >reason ${caseNumber} .`, newReason); 31 | logMsg.edit({embed}); 32 | }); 33 | }); 34 | };*/ 35 | 36 | -------------------------------------------------------------------------------- /commands/dm.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (!message.member.hasPermission("BAN_MEMBERS")) return message.channel.send(`Missing permissions to dm this user with the bot.`) 7 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 8 | const prefixtouse = row.prefix 9 | const usage = new Discord.RichEmbed() 10 | .setColor(0x00A2E8) 11 | .setThumbnail(client.user.avatarURL) 12 | .setTitle("Command: " + prefixtouse + "dm") 13 | .addField("Usage", prefixtouse + "dm @Someone ") 14 | .addField("Example", prefixtouse + "dm @Dowin Hey can you help me with something?") 15 | .setDescription("Description: " + "Bot dms a user with your message "); 16 | 17 | try { 18 | let who = message.mentions.users.first() 19 | if (message.mentions.users.size < 1) return message.channel.send(usage); 20 | if (message.author.id == who.id) return message.channel.send(`:x: Well no you can't dm yourself.`); 21 | message2 = args.slice(1).join(` `); 22 | if (message2 >= 400) return message.channel.send(usage) 23 | who.send('**Message from ' + message.author.username + '**: ' + message2) 24 | message.channel.send(`Sucessfully sent message to ${who.username}.`) 25 | } catch (err) { 26 | return; 27 | } 28 | }) 29 | } 30 | 31 | -------------------------------------------------------------------------------- /events/guildMemberAdd.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | module.exports = (client, member, guild) => { 6 | if (member.user.bot) return; 7 | sql.get(`SELECT * FROM scores WHERE guildId ="${member.guild.id}"`).then(row => { 8 | if (row.dmmessage === "enabled") { 9 | try { 10 | if (row.wlsystem === "disabled") return; 11 | let WelcomeMess = row.welcomemessage; 12 | var WelcomeFix = WelcomeMess.replace("%MENTION%", "<@" + member.user.id + ">").replace("%GUILDNAME%", member.guild.name).replace("%NAME%", member.user.username).replace("%MEMBERCOUNT%", member.guild.memberCount) 13 | member.user.send(WelcomeFix) 14 | } catch (err) { 15 | return; 16 | } 17 | } else { 18 | try { 19 | if (row.wlsystem === "disabled") return; 20 | const welcomeChannel = member.guild.channels.find('name', row.wlchannel); 21 | if (!welcomeChannel === null) return; 22 | let WelcomeMess = row.welcomemessage; 23 | var WelcomeFix = WelcomeMess.replace("%MENTION%", "<@" + member.user.id + ">").replace("%GUILDNAME%", member.guild.name).replace("%NAME%", member.user.username).replace("%MEMBERCOUNT%", member.guild.memberCount) 24 | client.channels.get(welcomeChannel.id).send(WelcomeFix) 25 | } catch (err) { 26 | return; 27 | } 28 | } 29 | }) 30 | } -------------------------------------------------------------------------------- /events/messageUpdate.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | 6 | module.exports = (client, message, editedMessage) => { 7 | if (message.author.bot) return; 8 | if (message.channel.type === 'dm') return; 9 | if (!message.guild.member(client.user).hasPermission('SEND_MESSAGES')) return; 10 | if (!message.guild.member(client.user).hasPermission('EMBED_LINKS')) return; 11 | if (!message.guild.member(client.user).hasPermission('VIEW_CHANNEL')) return; 12 | if (!message.guild.member(client.user).hasPermission('READ_MESSAGE_HISTORY')) return; 13 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 14 | if (message.author.bot) return; 15 | if (message === editedMessage) return; 16 | if (message.channel.type !== 'text') return; 17 | let guild = message.guild; 18 | let modlog = guild.channels.find(channel => channel.name == row.logschannel); 19 | if (!modlog) return; 20 | const embed = new Discord.RichEmbed() 21 | .setColor(0x00A2E8) 22 | .setThumbnail(message.author.avatarURL) 23 | .addField("Author ", `${message.author.tag} (ID: ${message.author.id})`, true) 24 | .addField("Before Edit ", `${message}`, true) 25 | .addField("After Edit", `${editedMessage}`, true) 26 | .setTimestamp() 27 | .setFooter("Message edit in " + message.channel.name); 28 | if (message.content.includes("http")) return; 29 | if (message.content.includes("www.")) return; 30 | client.channels.get(modlog.id).send({embed}); 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /events/guildMemberRemove.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | module.exports = (client, member, guild) => { 6 | if (member.user.bot) return; 7 | sql.get(`SELECT * FROM scores WHERE guildId ="${member.guild.id}"`).then(row => { 8 | if (row.dmmessage === "enabled") { 9 | try { 10 | if (row.wlsystem === "disabled") return; 11 | let WelcomeMess = row.leavemessage; 12 | var WelcomeFix = WelcomeMess.replace("%MENTION%", "<@" + member.user.id + ">").replace("%GUILDNAME%", member.guild.name).replace("%NAME%", member.user.username).replace("%MEMBERCOUNT%", member.guild.memberCount) 13 | member.user.send(WelcomeFix) 14 | } catch (err) { 15 | console.log(err) 16 | } 17 | } else { 18 | try { 19 | if (row.wlsystem === "disabled") return; 20 | const welcomeChannel = member.guild.channels.find('name', row.wlchannel); 21 | if (!welcomeChannel === null) return; 22 | let WelcomeMess = row.leavemessage; 23 | var WelcomeFix = WelcomeMess.replace("%MENTION%", "<@" + member.user.id + ">").replace("%GUILDNAME%", member.guild.name).replace("%NAME%", member.user.username).replace("%MEMBERCOUNT%", member.guild.memberCount) 24 | client.channels.get(welcomeChannel.id).send(WelcomeFix) 25 | } catch (err) { 26 | console.log(err) 27 | } 28 | } 29 | }) 30 | } -------------------------------------------------------------------------------- /commands/buttslap.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snek = require('snekfetch'); 4 | const fsn = require('fs-nextra'); 5 | exports.run = async (client, message, args) => { 6 | if (!message.guild.member(client.user).hasPermission('ATTACH_FILES')) return message.reply('Sorry, i dont have the perms to do this cmd i need ATTACH_FILES. :x:') 7 | const { Canvas } = require('canvas-constructor'); 8 | if (message.mentions.users.size < 1) return message.channel.send("You didn't mention a user to slap"); 9 | const getSlapped = async (slapper, slapped) => { 10 | const plate = await fsn.readFile('./assets/images/plate_buttslap.png'); 11 | const pngSlapper = slapper.replace('.gif', '.png'); 12 | const pngSlapped = slapped.replace('.gif', '.png'); 13 | const Slapper = await snek.get(pngSlapper); 14 | const Slapped = await snek.get(pngSlapped); 15 | return new Canvas(900, 475) 16 | .addImage(plate, 0, 0, 850, 475) 17 | .addImage(Slapper.body, 252, -39, 131, 131, { type: 'round', radius: 66 }) 18 | .restore() 19 | .addImage(Slapped.body, 460, 167, 131, 131, { type: 'round', radius: 66 }) 20 | .restore() 21 | .toBuffer(); 22 | } 23 | try { 24 | const slapped = message.mentions.users.first().avatarURL; 25 | const slapper = message.author.avatarURL; 26 | const result = await getSlapped(slapper, slapped); 27 | if (!message.channel.nsfw) return message.channel.send("Need to be in a nsfw channel to use this command.") 28 | await message.channel.send({ files: [{ attachment: result, name: 'buttslapped.png' }] }); 29 | } catch (error) { 30 | throw error; 31 | } 32 | } -------------------------------------------------------------------------------- /commands/prefix.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You are missing MANAGE_GUILD permission"); 7 | const newprefix = args[0] 8 | const newprefixfix = newprefix.replace(/[^\x00-\x7F]/g, ""); 9 | if (newprefix.length < 1) return message.channel.send("Didn't provide a new prefix to set") 10 | if (newprefixfix.length < 1) return message.channel.send("Prefix can't have ascii characters") 11 | if (newprefix.length > 7) return message.channel.send("prefix can't be longer then 7 characters") 12 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 13 | sql.run(`UPDATE scores SET prefix = "${newprefixfix}", casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 14 | message.channel.send("I have set the new guild prefix to " + newprefix) 15 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 16 | const embed = new Discord.RichEmbed() 17 | .setColor(0x00A2E8) 18 | .setTitle("Case #" + row.casenumber + " | Action: Prefix Change") 19 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 20 | .addField("New prefix", newprefixfix, true) 21 | .setFooter("Time used: " + message.createdAt.toDateString()) 22 | if (!modlog) return; 23 | if (row.logsenabled === "disabled") return; 24 | return client.channels.get(modlog.id).send({embed}); 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /commands/reload.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | const fs = require("fs"); 3 | const superagent = require(`superagent`); 4 | exports.run = (client, message, args) => { 5 | if (message.author.id !== "130515926117253122") return message.channel.send("Only owners can use this command"); 6 | try { 7 | client.user.setPresence({ game: { name: ">help - In " + (Math.ceil(client.guilds.size)) + ` servers`, type: 0 } }); 8 | fs.readdir("./commands/", (err, files) => { 9 | const filez = files.length 10 | if (err) return console.error(err); 11 | message.channel.send(`Refreshed \`${filez + 11}\` commands successfully!`) 12 | console.log(`Refreshed ${filez + 11} commands`) 13 | files.forEach(file => { 14 | delete require.cache[require.resolve(`./${file}`)]; 15 | }); 16 | }); 17 | const servercount = (Math.ceil(client.guilds.size)) 18 | superagent.post(`https://discordbots.org/api/bots/${client.user.id}/stats`) 19 | .set('Authorization', 'KEY') 20 | .send({ 21 | server_count: servercount, 22 | shard_count: "1" 23 | }) 24 | .then(console.log('Updated discordbots.org status.')) 25 | .catch(e => console.warn('dbots.org down spam @oliy')); 26 | superagent.post(`https://bots.discord.pw/api/bots/${client.user.id}/stats`) 27 | .set('Authorization', 'KEY') 28 | .send({ 29 | server_count: servercount, 30 | shard_count: "1" 31 | }) 32 | .then(console.log('Updated bots.discord.pw status.')) 33 | .catch(e => console.warn('bots.discord.pw down spam @oliy')); 34 | } catch (err) { 35 | return; 36 | } 37 | }; -------------------------------------------------------------------------------- /commands/booksearch.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | try { 6 | const query = args.join(' '); 7 | if (query < 1) return message.channel.send("Didnt provide a book title to search for.") 8 | const { body } = await snekfetch 9 | .get('https://www.googleapis.com/books/v1/volumes') 10 | .query({ 11 | maxResults: 1, 12 | q: query, 13 | //maxAllowedMaturityRating: "NOT_MATURE", 14 | key: "GOOGLE_KEY" 15 | }); 16 | const description = body.items[0].volumeInfo.description 17 | const descriptionfix = description.substr(0, 600); 18 | const embed = new Discord.RichEmbed() 19 | .setColor(0x00A2E8) 20 | .setTitle(body.items[0].volumeInfo.title) 21 | .addField("Author(s) ", body.items[0].volumeInfo.authors) 22 | .addField("Publisher ", body.items[0].volumeInfo.publisher) 23 | .addField("Page Count", body.items[0].volumeInfo.pageCount) 24 | .addField("Genres" , body.items[0].volumeInfo.categories.length ? body.items[0].volumeInfo.categories.join(', ') : '???') 25 | .addField("Description", body.items[0].volumeInfo.description ? descriptionfix : 'No description available.') 26 | .addField("Purchase link:", body.items[0].volumeInfo.canonicalVolumeLink) 27 | .setThumbnail(body.items[0].volumeInfo.imageLinks.thumbnail); 28 | message.channel.send(embed) 29 | } catch (err) { 30 | console.log(err) 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /assets/handlers/addDbEntry.js: -------------------------------------------------------------------------------- 1 | const sql = require("sqlite"); 2 | sql.open("./assets/guildsettings.sqlite"); 3 | 4 | module.exports = { 5 | addGuildtoDB: (guild) => { 6 | sql.get(`SELECT * FROM scores WHERE guildId ="${guild.id}"`).then(row => { 7 | if (!row) { 8 | sql.run("INSERT INTO scores (guildId, prefix, casenumber, autoroleenabled, roletogive, logsenabled, logschannel, automoderation, wlchannel, wlsystem, welcomemessage, leavemessage, dmmessage, slowmode, slowmodetime, invitelinkprotection, websitelinkprotection, dupcharactersprotection, antijoin, modonlycommands, botlock, botlockchannel, levelsystem) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", [guild.id, ">", 1, "enabled", "none", "enabled", "logs", "disabled", "welcome", "disabled", "Hello %MENTION%, welcome to %GUILDNAME%.", "%NAME% has left the guild", "disabled", "disabled", 3, "disabled", "disabled", "disabled", "disabled", "disabled", "disabled", "bot-commands", "disabled"]); 9 | } 10 | }).catch((err) => { 11 | console.log(err); 12 | sql.run("INSERT INTO scores (guildId, prefix, casenumber, autoroleenabled, roletogive, logsenabled, logschannel, automoderation, wlchannel, wlsystem, welcomemessage, leavemessage, dmmessage, slowmode, slowmodetime, invitelinkprotection, websitelinkprotection, dupcharactersprotection, antijoin, modonlycommands, botlock, botlockchannel, levelsystem) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", [guild.id, ">", 1, "enabled", "none", "enabled", "logs", "disabled", "welcome", "disabled", "Hello %MENTION%, welcome to %GUILDNAME%.", "%NAME% has left the guild", "disabled", "disabled", 3, "disabled", "disabled", "disabled", "disabled", "disabled", "disabled", "bot-commands", "disabled"]); 13 | }) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /commands/itunes.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = (client, message, args) => { 5 | try { 6 | const query = args[0] 7 | const country = args[1] 8 | const { body } = await snekfetch 9 | .get('https://itunes.apple.com/search') 10 | .query({ 11 | term: query, 12 | media: 'music', 13 | entity: 'song', 14 | limit: 1, 15 | explicit: message.channel.nsfw ? 'yes' : 'no', 16 | country 17 | }); 18 | const body2 = JSON.parse(body.toString()); 19 | if (!body2.results.length) return message.channel.send('Could not find any results.'); 20 | const data = body2.results[0]; 21 | const embed = new Discord.RichEmbed() 22 | .setColor(0xFEFEFE) 23 | .setAuthor('iTunes', 'https://i.imgur.com/PR29ow0.jpg', 'https://www.apple.com/itunes/') 24 | .setURL(data.trackViewUrl) 25 | .setThumbnail(data.artworkUrl100) 26 | .setTitle(data.trackName) 27 | .addField('❯ Artist', data.artistName, true) 28 | .addField('❯ Album', data.collectionName, true) 29 | .addField('❯ Release Date', new Date(data.releaseDate).toDateString(), true) 30 | .addField('❯ Genre', data.primaryGenreName, true); 31 | return message.channel.send(embed); 32 | } catch (err) { 33 | if (err.statusCode === 400) { 34 | returnmessage.channel.send('Invalid country code. Refer to .'); 35 | } 36 | return message.channel.send(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); 37 | } 38 | } -------------------------------------------------------------------------------- /commands/antiraid.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | if (!message.member.permissions.has("MANAGE_CHANNELS")) return message.channel.send("Sorry, you do not have permission to perform the antiraid command."); 5 | if (!message.guild.member(client.user).hasPermission('MANAGE_CHANNELS')) return message.reply('Sorry, i dont have the perms to do this cmd i need MANAGE_CHANNELS. :x:') 6 | const ms = require('ms'); 7 | if (!client.lockit) client.lockit = []; 8 | const time = args.join(' '); 9 | const validUnlocks = ['release', 'unlock', 'stop', 'off']; 10 | if (!time) return message.reply('You must set a duration for the lockdown in either hours, minutes or seconds'); 11 | 12 | if (validUnlocks.includes(time)) { 13 | message.channel.overwritePermissions(message.guild.id, { 14 | SEND_MESSAGES: true 15 | }).then(() => { 16 | message.channel.send('Lockdown lifted.'); 17 | clearTimeout(client.lockit[message.channel.id]); 18 | delete client.lockit[message.channel.id]; 19 | }).catch(error => { 20 | console.log(error); 21 | }); 22 | } else { 23 | message.channel.overwritePermissions(message.guild.id, { 24 | SEND_MESSAGES: false 25 | }).then(() => { 26 | message.channel.send(`Channel locked down for ${ms(ms(time), { long:true })}`).then(() => { 27 | 28 | client.lockit[message.channel.id] = setTimeout(() => { 29 | message.channel.overwritePermissions(message.guild.id, { 30 | SEND_MESSAGES: true 31 | }).then(message.channel.send('Lockdown lifted.')) 32 | delete client.lockit[message.channel.id]; 33 | }, ms(time)); 34 | }).catch(error => { 35 | console.log(error); 36 | }); 37 | }); 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /commands/slots.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | const slots = [':grapes:', ':cherries:', ':lemon:']; 5 | const slotOne = slots[Math.floor(Math.random() * slots.length)]; 6 | const slotTwo = slots[Math.floor(Math.random() * slots.length)]; 7 | const slotThree = slots[Math.floor(Math.random() * slots.length)]; 8 | const slotfour = slots[Math.floor(Math.random() * slots.length)]; 9 | const slotfive = slots[Math.floor(Math.random() * slots.length)]; 10 | const slotsix = slots[Math.floor(Math.random() * slots.length)]; 11 | const slotseven = slots[Math.floor(Math.random() * slots.length)]; 12 | const sloteight = slots[Math.floor(Math.random() * slots.length)]; 13 | const slotnine = slots[Math.floor(Math.random() * slots.length)]; 14 | if (slotOne === slotTwo && slotOne === slotThree || slotfour === slotfive && slotfour === slotsix || slotseven === sloteight && slotseven === slotnine) { 15 | const won = new Discord.RichEmbed() 16 | .setColor(0x00A2E8) 17 | .addField("Line 1", `${slotfour}|${slotfive}|${slotsix}`) 18 | .addField("Line 2", `${slotOne}|${slotTwo}|${slotThree}`) 19 | .addField("Line 3", `${slotseven}|${sloteight}|${slotnine}`) 20 | .setFooter("Wow! " + message.author.username + " won great job!"); 21 | message.channel.send(won) 22 | } else { 23 | const lost = new Discord.RichEmbed() 24 | .setColor(0x00A2E8) 25 | .addField("Line 1", `${slotfour}|${slotfive}|${slotsix}`) 26 | .addField("Line 2", `${slotOne}|${slotTwo}|${slotThree}`) 27 | .addField("Line 3", `${slotseven}|${sloteight}|${slotnine}`) 28 | .setFooter("Awww " + message.author.username + " lost that sucks!"); 29 | message.channel.send(lost) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /commands/hack.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | const talkedRecently = new Set(); 6 | exports.run = (client, message, args) => { 7 | if (talkedRecently.has(message.author.id)) return message.channel.send("You already hacked in the last 15 mins please wait.") 8 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 9 | if (!row) return; 10 | var dice = Math.floor(Math.random() * 1000 + 1); 11 | var dice2 = Math.floor(Math.random() * 3); 12 | var dice3 = Math.floor(Math.random() * 400 + 1); 13 | var possiblethingstohack = ["the bank", "Mr. Robot", "a server", "the casino", "ken's computer"]; 14 | if (dice2 >= 2) { 15 | message.channel.send("You were caught trying to hack " + possiblethingstohack[Math.floor(Math.random () * possiblethingstohack.length)] + " and paid a fine of: $" + dice3) 16 | sql.run(`UPDATE profiles SET cash = ${row.cash -= dice3} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 17 | } else { 18 | sql.run(`UPDATE profiles SET cash = ${row.cash += dice} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 19 | message.channel.send("You successfully hacked " + possiblethingstohack[Math.floor(Math.random () * possiblethingstohack.length)] + " and earned $" + dice + " from it, you can hack again in 15 mins") 20 | talkedRecently.add(message.author.id); 21 | setTimeout(() => { 22 | talkedRecently.delete(message.author.id); 23 | }, 15 * 60000); 24 | } 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /commands/report.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = async (client, message, args) => { 4 | 5 | var cooldownUsers = []; 6 | 7 | const checkCooldown = ((userId) => { 8 | if (cooldownUsers.indexOf(userId) > -1) { 9 | return true; 10 | } else { 11 | return false; 12 | } 13 | }); 14 | 15 | const removeCooldown = ((userId, timeInSeconds) => { 16 | let index = cooldownUsers.indexOf(userId); 17 | if (index > -1) { 18 | setTimeout(() => { 19 | cooldownUsers = cooldownUsers.splice(index, 0); 20 | }, timeInSeconds * 1000) 21 | } 22 | }); 23 | 24 | if (checkCooldown(message.author.id)) { 25 | message.channel.send("Sorry! Please wait another 10 secpmds to report again."); 26 | return; 27 | } 28 | cooldownUsers.push(message.author.id); 29 | removeCooldown(message.author.id, 10000); 30 | let member = message.mentions.members.first(); 31 | if (message.author.id == member.id) return message.channel.send("Can't report yourself. :x:") 32 | let reason = args.slice(1).join(" ") || `Moderator didn't give a reason.`; 33 | if (message.mentions.users.size < 1) return message.channel.send("Didnt mention a user to report.") 34 | let modlog = message.guild.channels.find('name', "reports"); 35 | const embed = new Discord.RichEmbed() 36 | .setColor(0x00A2E8) 37 | .setTitle("Action: Report") 38 | .addField("Reported By:", message.author.tag + " (ID: " + message.author.id + ")") 39 | .addField("Reported User:", member.user.username + " (ID: " + member.id + ")") 40 | .addField("Reason", reason, true) 41 | .setFooter("Time reported: " + message.createdAt.toDateString()) 42 | if (!modlog) return; 43 | message.channel.send("User has been reported, will be checked soon.") 44 | client.channels.get(modlog.id).send({embed}); 45 | } 46 | -------------------------------------------------------------------------------- /commands/rule34.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | const { promisifyAll } = require('tsubaki'); 5 | const xml = promisifyAll(require('xml2js')); 6 | exports.run = async (client, message, args) => { 7 | if (!message.channel.nsfw) return message.channel.send("Cannot send NSFW content in a SFW channel.") 8 | const query = args.join('_'); 9 | if (query < 1) { 10 | const { body } = await snekfetch 11 | .get('https://www.reddit.com/r/rule34.json?sort=top&t=week') 12 | .query({ limit: 800 }); 13 | const allowed = !message.channel.nsfw ? body.data.children : body.data.children.filter(post => post.data.over_18); 14 | if (!allowed.length) return message.channel.send('It seems we are out of fresh iamges for you!, Try again later.'); 15 | const randomnumber = Math.floor(Math.random() * allowed.length) 16 | const embed = new Discord.RichEmbed() 17 | .setColor(0x00A2E8) 18 | .setTitle(allowed[randomnumber].data.title) 19 | .setImage(allowed[randomnumber].data.url) 20 | message.channel.send(embed) 21 | } else { 22 | const { text } = await snekfetch 23 | .get('https://rule34.xxx/index.php') 24 | .query({ 25 | page: 'dapi', 26 | s: 'post', 27 | q: 'index', 28 | tags: query, 29 | limit: 1 30 | }); 31 | const { posts } = await xml.parseStringAsync(text); 32 | if (posts.$.count === '0') return message.channel.send('No Results found for ' + query + '.'); 33 | const embed = new Discord.RichEmbed() 34 | .setTitle("Results for " + query) 35 | .setImage(posts.post[0].$.file_url) 36 | .setColor(0x00A2E8) 37 | message.channel.send(embed).catch(console.error); 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /commands/transfer.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | const user = message.mentions.users.first(); 7 | if (message.mentions.users.size < 1) return message.channel.send("Need to tag a user to transfer money to them.") 8 | let transferamount = parseInt(args.slice(1).join(' ')); 9 | let taxtransfer = (transferamount / 100) * 80; 10 | let taxtransferz = (transferamount / 100) * 20; 11 | if (transferamount <= 1) return message.channel.send("You can't give anything below 1"); 12 | if (isNaN(transferamount)) return message.channel.send("Not a valid number"); 13 | if (user.id === message.author.id) return message.channel.send("Can't transfer money to yourself") 14 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 15 | if (!row) return message.channel.nend("Have no money need to start talking first.") 16 | if (row.cash < transferamount) return message.channel.send("You dont have enough money to transfer that much, you have: $" + row.cash); 17 | sql.run(`UPDATE profiles SET cash = ${row.cash -= transferamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 18 | message.channel.send("I have successfully transfered $" + taxtransfer + ", to " + user.username + ". Transaction fee: $" + taxtransferz + ", New balance: $" + row.cash + ".") 19 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${user.id}"`).then(row2 => { 20 | if (!row2) return message.channel.nend("Have no money need to start talking first.") 21 | sql.run(`UPDATE profiles SET cash = ${row2.cash += taxtransfer} WHERE guildId ="${message.guild.id}" AND userId = ${user.id}`); 22 | }) 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /commands/reminder.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | let chrono = require("chrono-node"); 4 | var moment = require('moment'); 5 | exports.run = (client, message, args) => { 6 | let messagez = args.join(' '); 7 | if (messagez.length < 1) return message.channel.send('Incorrect format. !reminder '); 8 | return new Promise((resolve) => { 9 | if (!isNaN(messagez[0])) { 10 | const time = parseInt(messagez[0]); 11 | if (time > 2880 || isNaN(time)) return message.channel.send('Maximum time is 2 days (2880 minutes)'); 12 | if (time < 1) return message.channel.send('Time must be at least 1 minute.'); 13 | setTimeout(() => { 14 | message.reply(`Remember: ${messagez.split(' ').slice(1).join(' ')}!`); 15 | }, time * 60000); 16 | const minutemessage = time === 1 ? 'minute' : 'minutes'; 17 | return message.channel.send(`Reminding you in ${time} ${minutemessage}.`); 18 | } 19 | 20 | const results = chrono.parse(messagez); 21 | if (results.length === 0) return message.channel.send('Error parsing date. Try using format: !remind '); 22 | 23 | let endTime = moment(results[0].start.date()); 24 | const currentTime = new moment(); 25 | let duration = moment.duration(endTime.diff(currentTime)); 26 | let minutes = Math.round(duration.asMinutes()); 27 | 28 | if (minutes < 1) { 29 | if (results[0].end) { 30 | endTime = results[0].end.date(); 31 | duration = moment.duration(endTime.diff(currentTime)); 32 | minutes = duration.asMinutes(); 33 | } 34 | if (minutes < 1) { 35 | return message.channel.send('Time must be at least 1 minute.') 36 | } 37 | } 38 | if (minutes > 2880) return message.channel.send('Maximum time is 2 days (2880 minutes)'); 39 | 40 | setTimeout(() => { 41 | message.reply(`Remember: "${messagez}"!`); 42 | }, minutes * 60000); 43 | const minutemessage = minutes === 1 ? 'minute' : 'minutes'; 44 | return message.channel.send(`Reminding you in ${minutes} ${minutemessage} for ${messagez}.`); 45 | }); 46 | } 47 | -------------------------------------------------------------------------------- /commands/flipcoin.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | try { 7 | var number = parseInt(args[0]); 8 | const wonamount = (Math.round(number * 1.25)) 9 | var headsortails = args.slice(1).join("") 10 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 11 | var coinflips = ['Heads!','Tails!']; 12 | const coinflip = coinflips[Math.floor(Math.random () * coinflips.length)]; 13 | if (coinflip === 'Heads!' && headsortails === "heads") { 14 | sql.run(`UPDATE profiles SET cash = ${row.cash += wonamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 15 | message.channel.send("Coin flipped and it landed on heads and you win $" + wonamount + ".") 16 | } else if (coinflip === 'Heads!' && headsortails === "tails") { 17 | sql.run(`UPDATE profiles SET cash = ${row.cash -= number} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 18 | message.channel.send("Coin flipped and it landed on heads and you lose $" + number + ".") 19 | } else if (coinflip === 'Tails!' && headsortails === "tails") { 20 | sql.run(`UPDATE profiles SET cash = ${row.cash += wonamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 21 | message.channel.send("Coin flipped and it landed on tails and you win $" + wonamount + ".") 22 | } else if (coinflip === 'Tails!' && headsortails === "heads") { 23 | sql.run(`UPDATE profiles SET cash = ${row.cash -= number} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 24 | message.channel.send("Coin flipped and it landed on tails and you lose $" + number + ".") 25 | } else { 26 | message.channel.send("That option wasnt found, command usage >flipcoin [bet] [heads/tails]") 27 | } 28 | }) 29 | } catch (err) { 30 | console.log(err) 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /commands/whois.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | let embed2 = new Discord.RichEmbed() 5 | .setColor(0x00A2E8) 6 | .setThumbnail(message.author.avatarURL) 7 | .addField("Username ", `${message.author.tag} (ID: ${message.author.id})`, true) 8 | .addField("Status", message.member.presence !== null && message.member.presence.status !== null ? message.member.presence.status : "Offline") 9 | .addField("Playing ", `${message.author.presence.game === null ? "None" : message.author.presence.game.name}`, true) 10 | .addField("Nickname ", `${message.member.displayName}`, true) 11 | .addField("Role(s) ", `${message.member.roles.map(r => r.name).join(", ")}`) 12 | .addField("Highest Role ", message.member.highestRole.name) 13 | .addField("Joined Guild At ", `${message.member.joinedAt.toDateString()}`) 14 | .addField("Joined Discord At ", `${message.author.createdAt.toDateString()}`) 15 | .setTimestamp() 16 | .setFooter(message.author.username, message.author.avatarURL); 17 | if (message.mentions.users.size < 1) return message.channel.send(embed2); 18 | 19 | let member = message.mentions.members.first(); 20 | let embed = new Discord.RichEmbed() 21 | .setColor(0x00A2E8) 22 | .setThumbnail(member.user.avatarURL) 23 | .addField("Username ", `${member.user.tag} (ID: ${member.id})`, true) 24 | .addField("Status", member.presence !== null && member.presence.status !== null ? member.presence.status : "Offline") 25 | .addField("Playing ", `${member.user.presence.game === null ? "Nothing" : member.user.presence.game.name}`, true) 26 | .addField("Nickname ", `${member.nickname === null ? "None" : member.nickname}`, true) 27 | .addField("Role(s) ", `${member.roles.map(r => r.name).join(", ")}`) 28 | .addField("Highest Role ", member.highestRole.name) 29 | .addField("Joined Guild At ", `${member.joinedAt.toDateString()}`) 30 | .addField("Joined Discord At ", `${member.user.createdAt.toDateString()}`) 31 | .setTimestamp() 32 | .setFooter(member.user.username, member.user.avatarURL); 33 | message.channel.send({embed}) 34 | } 35 | -------------------------------------------------------------------------------- /commands/rps.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | exports.run = (client, message, args) => { 4 | let choice = args.join(' ').toLowerCase(); 5 | const choices = ['paper', 'rock', 'scissors', choice, 'scissors', 'rock', 'paper', 'rock', 'scissors', 'paper']; 6 | const response = choices[Math.floor(Math.random() * choices.length)]; 7 | if (choice === 'rock') { 8 | if (response === 'rock') return message.reply('I picked rock! and you picked rock \n Oh no its a tie!'); 9 | else if (response === 'paper') return message.reply('I picked paper! and you picked rock \n Paper Wins!'); 10 | else return message.reply('I picked scissors! and you picked rock \n Rock Wins'); 11 | } else if (choice === 'paper') { 12 | if (response === 'rock') return message.reply('I picked rock! and you picked paper \n Paper Wins!'); 13 | else if (response === 'paper') return message.reply('I picked paper! and you picked paper \n Oh no its a tie!'); 14 | else return message.reply('I picked scissors! and you picked paper \n Scissors Wins!'); 15 | } else if (choice === 'scissors') { 16 | if (response === 'rock') return message.reply('I picked rock! and you picked scissors \n Rock Wins!'); 17 | else if (response === 'paper') return message.reply('I picked paper! and you picked scissors \n Scissors Wins!'); 18 | else return message.reply('I picked scissors! and you picked scissors \n Oh no its a tie!'); 19 | } else { 20 | if (response === 'rock') return message.reply('I picked rock! and you picked ' + choice + '\n Rock Wins!'); 21 | else if (response === 'paper') return message.reply('I picked paper! and you picked ' + choice + '\n Paper Wins!'); 22 | else if (response === 'scissors') return message.reply('I picked scissors! and you picked ' + choice + '\n Scissors Wins!'); 23 | else if (response === choice) return message.reply('I picked ' + choice + '! and you picked ' + choice + '\n Oh no its a tie!'); 24 | } 25 | } -------------------------------------------------------------------------------- /commands/rob.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | const user = message.mentions.users.first(); 7 | if (message.mentions.users.size < 1) return message.channel.send("Need to tag a user to rob them.") 8 | if (user.id === message.author.id) return message.channel.send("You can't rob money from yourself") 9 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 10 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${user.id}"`).then(row2 => { 11 | if (!row) return message.channel.nend("Have no money need to start talking first.") 12 | if (!row2) return message.channel.nend("User has no money need to earn some before you can rob them.") 13 | if (row2.cash < 0) return message.channel.send("User has no money to rob them.") 14 | var dice = Math.floor(Math.random() * 99 + 1); 15 | var dice2 = Math.floor(Math.random() * row2.cash); 16 | var dice3 = Math.floor(Math.random() * 1000 + 1); 17 | if (dice >= "75") { 18 | sql.run(`UPDATE profiles SET cash = ${row.cash += dice2} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 19 | sql.run(`UPDATE profiles SET cash = ${row2.cash -= dice2} WHERE guildId ="${message.guild.id}" AND userId = ${user.id}`); 20 | message.channel.send("You have successfully robbed $" + dice2 + ", from " + user.username + ", New balance: $" + row.cash + ".") 21 | } else { 22 | sql.run(`UPDATE profiles SET cash = ${row.cash -= dice3} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 23 | message.channel.send("You were caught trying to rob " + user.username + ", and you payed a fine of: $" + dice3 + ", New balance: $" + row.cash + ".") 24 | } 25 | }) 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /commands/roleall.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (!message.member.hasPermission("MANAGE_ROLES")) return message.channel.send("You're missing MANAGE_ROLES permission") 7 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 8 | var userz = message.guild.members.array(); 9 | const roletogive = args.join(" ") 10 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 11 | let subscriberRole = client.guilds.get(message.guild.id).roles.find(r => r.name == roletogive); 12 | if (!subscriberRole) return message.channel.send("I can not find the role " + roletogive + " :x:"); 13 | 14 | if (row.logsenabled === 'disabled') { 15 | try { 16 | userz.forEach(u => { 17 | u.addRole(subscriberRole) 18 | }) 19 | message.channel.send("I have given the role " + roletogive + " to all members.") 20 | } catch (err) { 21 | return; 22 | } 23 | } else { 24 | sql.run(`UPDATE scores SET logsenabled = "disabled" WHERE guildId = ${message.guild.id}`); 25 | try { 26 | userz.forEach(u => { 27 | u.addRole(subscriberRole) 28 | }) 29 | message.channel.send("I have given the role " + roletogive + " to all members.") 30 | const embed = new Discord.RichEmbed() 31 | .setColor(0x00A2E8) 32 | .setTitle("Case #" + row.casenumber + " | Action: Give Role All") 33 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 34 | .addField("Role Given:", roletogive) 35 | .setFooter("Time used: " + message.createdAt.toDateString()) 36 | if (!modlog) return; 37 | sql.run(`UPDATE scores SET logsenabled = "enabled", casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 38 | return client.channels.get(modlog.id).send({embed}); 39 | } catch (err) { 40 | return; 41 | } 42 | } 43 | }) 44 | } 45 | -------------------------------------------------------------------------------- /commands/modonly.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You are missing MANAGE_GUILD permission"); 7 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 8 | if (row.modonlycommands === "disabled") { 9 | sql.run(`UPDATE scores SET modonlycommands = "enabled", casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 10 | message.channel.send("Now only mods/mods+ can use the bot commands.") 11 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 12 | const embed = new Discord.RichEmbed() 13 | .setColor(0x00A2E8) 14 | .setTitle("Case #" + row.casenumber + " | Action: Mod-Only Cmds Enabled") 15 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 16 | .setFooter("Time used: " + message.createdAt.toDateString()) 17 | if (!modlog) return; 18 | if (row.logsenabled === "disabled") return; 19 | return client.channels.get(modlog.id).send({embed}); 20 | } else { 21 | sql.run(`UPDATE scores SET modonlycommands = "disabled", casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 22 | message.channel.send("Now anyone can use the bot commands.") 23 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 24 | const embed = new Discord.RichEmbed() 25 | .setColor(0x00A2E8) 26 | .setTitle("Case #" + row.casenumber + " | Action: Mod-Only Cmds Disabled") 27 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 28 | .setFooter("Time used: " + message.createdAt.toDateString()) 29 | if (!modlog) return; 30 | if (row.logsenabled === "disabled") return; 31 | return client.channels.get(modlog.id).send({embed}); 32 | } 33 | }) 34 | } 35 | -------------------------------------------------------------------------------- /commands/google.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const got = require('got'); 4 | const cheerio = require('cheerio'); 5 | const QUERY_STRING_SETTINGS = [ 6 | 'client=chrome', 7 | 'rls=en', 8 | 'ie=UTF-8', 9 | 'oe=UTF-8' 10 | ].join('&'); 11 | 12 | function getText(children) { 13 | if (children.children) return getText(children.children); 14 | return children.map(c => { 15 | return c.children ? getText(c.children) : c.data; 16 | }).join(''); 17 | } 18 | exports.run = async (client, message, args) => { 19 | 20 | if (args.length < 1) { 21 | throw 'You must enter something to search for!'; 22 | } 23 | 24 | const res = await got(`https://google.com/search?${QUERY_STRING_SETTINGS}&q=${encodeURIComponent(args.join(' '))}`); 25 | if (res.statusCode !== 200) { 26 | return message.channel.send(`Error! (${res.statusCode}): ${res.statusMessage}`); 27 | } 28 | 29 | let $ = cheerio.load(res.body); 30 | let results = []; 31 | 32 | $('.g').each((i) => { 33 | results[i] = {}; 34 | }); 35 | 36 | $('.g>.r>a').each((i, e) => { 37 | let raw = e.attribs['href']; 38 | results[i]['link'] = decodeURIComponent(raw.substr(7, raw.indexOf('&sa=U') - 7)); 39 | }); 40 | 41 | $('.g>.s>.st').each((i, e) => { 42 | results[i]['description'] = getText(e); 43 | }); 44 | 45 | let output = results.filter(r => r.link && r.description) 46 | .slice(0, 3) 47 | .map(r => `${r.link}\n\t${r.description}\n`) 48 | .join('\n'); 49 | 50 | if (output.length < 1) return message.channel.send("No results for " + args.join(" ")) 51 | const filtercheck = ["xxx", "porn", "fuck", "sex", "18+", "anal", "gay", "lesbian", "dick", "cock", "boobs", "ass", "nsfw", "tits", "nudes", "hentai", "nodes", "vagina", "pussy", "penis"] 52 | if (filtercheck.some(word2 => output.toLowerCase().includes(word2))) return message.channel.send("Not allowed to google nsfw content."); 53 | 54 | const embed = new Discord.RichEmbed() 55 | .setColor(0x00A2E8) 56 | .setTitle(`Search results for ${args.join(' ')}`) 57 | .setDescription(output) 58 | message.channel.send({embed}) 59 | 60 | } 61 | -------------------------------------------------------------------------------- /commands/profilesystem.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You are missing MANAGE_GUILD permission"); 7 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 8 | if (row.levelsystem === "disabled") { 9 | sql.run(`UPDATE scores SET levelsystem = "enabled", casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 10 | message.channel.send("I have enabled levels/xp/cash in this guild") 11 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 12 | const embed = new Discord.RichEmbed() 13 | .setColor(0x00A2E8) 14 | .setTitle("Case #" + row.casenumber + " | Action: Profile System Enabled") 15 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 16 | .setFooter("Time used: " + message.createdAt.toDateString()) 17 | if (!modlog) return; 18 | if (row.logsenabled === "disabled") return; 19 | return client.channels.get(modlog.id).send({embed}).catch(console.error); 20 | } else { 21 | sql.run(`UPDATE scores SET levelsystem = "disabled", casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 22 | message.channel.send("I have disabled levels/xp/cash in this guild") 23 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 24 | const embed = new Discord.RichEmbed() 25 | .setColor(0x00A2E8) 26 | .setTitle("Case #" + row.casenumber + " | Action: Profile System Disabled") 27 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 28 | .setFooter("Time used: " + message.createdAt.toDateString()) 29 | if (!modlog) return; 30 | if (row.logsenabled === "disabled") return; 31 | return client.channels.get(modlog.id).send({embed}).catch(console.error); 32 | } 33 | }) 34 | } 35 | -------------------------------------------------------------------------------- /commands/givexp.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("Need MANAGE_GUILD permission to use this command.") 7 | const user = message.mentions.users.first(); 8 | if (message.mentions.users.size < 1) { 9 | const amount = parseInt(args[0]); 10 | if (amount < 1) return message.channel.send("Didnt provide any xp to give."); 11 | if (amount >= 9999999) return message.channel.send("Max xp to give is 9999999") 12 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row2 => { 13 | if (!row2) message.channel.send("You needs to start talking first.") 14 | if (row2.xp >= 9999999) return message.channel.send("Max xp is 9999999") 15 | if (isNaN(amount)) return message.channel.send("Not a valid number") 16 | sql.run(`UPDATE profiles SET xp = ${row2.xp += amount}, username = "${message.author.username}" WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 17 | message.channel.send("I have given xp to: " + message.author.username + " " + amount + "XP"); 18 | }) 19 | } else { 20 | const amount = parseInt(args[1]); 21 | if (amount < 1) return message.channel.send("Didnt provide any xp to give."); 22 | if (amount >= 9999999) return message.channel.send("Max xp to give is 9999999") 23 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${user.id}"`).then(row => { 24 | if (!row) message.channel.send("User needs to start talking first.") 25 | if (row.xp >= 9999999) return message.channel.send("Max xp is 9999999") 26 | if (amount >= 999999) return message.channel.send("Max xp to give is $999999") 27 | if (isNaN(amount)) return message.channel.send("Not a valid number") 28 | sql.run(`UPDATE profiles SET xp = ${row.xp += amount} WHERE guildId ="${message.guild.id}" AND userId = ${user.id}`); 29 | message.channel.send("I have given xp to: " + user.username + " " + amount + "XP"); 30 | }) 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /commands/rroleall.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (!message.member.hasPermission("MANAGE_ROLES")) return message.channel.send("You're missing MANAGE_ROLES permission") 7 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 8 | var userz = message.guild.members.array(); 9 | const roletogive = args.join(" ") 10 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 11 | let subscriberRole = client.guilds.get(message.guild.id).roles.find(r => r.name == roletogive); 12 | if (!subscriberRole) return message.channel.send("I can not find the role " + roletogive + " :x:"); 13 | 14 | if (row.logsenabled === 'disabled') { 15 | try { 16 | userz.forEach(u => { 17 | u.removeRole(subscriberRole) 18 | }) 19 | message.channel.send("I have taken the role " + roletogive + " from all members.") 20 | return client.channels.get(modlog.id).send({embed}); 21 | } catch (err) { 22 | return; 23 | } 24 | } else { 25 | sql.run(`UPDATE scores SET logsenabled = "disabled" WHERE guildId = ${message.guild.id}`); 26 | try { 27 | userz.forEach(u => { 28 | u.removeRole(subscriberRole) 29 | }) 30 | message.channel.send("I have taken the role " + roletogive + " from all members.") 31 | const embed = new Discord.RichEmbed() 32 | .setColor(0x00A2E8) 33 | .setTitle("Case #" + row.casenumber + " | Action: Remove Role All") 34 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 35 | .addField("Role Taken:", roletogive) 36 | .setFooter("Time used: " + message.createdAt.toDateString()) 37 | if (!modlog) return; 38 | sql.run(`UPDATE scores SET logsenabled = "enabled", casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 39 | return client.channels.get(modlog.id).send({embed}); 40 | } catch (err) { 41 | return; 42 | } 43 | } 44 | }) 45 | } 46 | -------------------------------------------------------------------------------- /commands/givemoney.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("Need MANAGE_GUILD permission to use this command.") 7 | const user = message.mentions.users.first(); 8 | if (message.mentions.users.size < 1) { 9 | const amount = parseInt(args[0]); 10 | if (amount < 1) return message.channel.send("Didnt provide any money to give."); 11 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row2 => { 12 | if (!row2) message.channel.send("You needs to start talking first.") 13 | const doingmath = row2.cash + row2.bank 14 | if (doingmath >= 999999) return message.channel.send("Max money is $999999") 15 | if (amount >= 999999) return message.channel.send("Max money to give is $999999") 16 | if (isNaN(amount)) return message.channel.send("Not a valid number") 17 | sql.run(`UPDATE profiles SET cash = ${row2.cash += amount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 18 | message.channel.send("I have given money to: " + message.author.username + " $" + amount); 19 | }) 20 | } else { 21 | const amount = parseInt(args[1]); 22 | if (amount < 1) return message.channel.send("Didnt provide any money to give."); 23 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${user.id}"`).then(row => { 24 | if (!row) message.channel.send("User needs to start talking first.") 25 | const doingmath = row.cash + row.bank 26 | if (doingmath >= 999999) return message.channel.send("Max money is $999999") 27 | if (amount >= 999999) return message.channel.send("Max money to give is $999999") 28 | if (isNaN(amount)) return message.channel.send("Not a valid number") 29 | sql.run(`UPDATE profiles SET cash = ${row.cash += amount} WHERE guildId ="${message.guild.id}" AND userId = ${user.id}`); 30 | message.channel.send("I have given money to: " + user.username + " $" + amount); 31 | }) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /commands/weather.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const snekfetch = require('snekfetch'); 4 | exports.run = async (client, message, args) => { 5 | const query = args.join(" "); 6 | const { body } = await snekfetch 7 | .get('https://query.yahooapis.com/v1/public/yql') 8 | .query({ 9 | q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${query}")`, // eslint-disable-line max-len 10 | format: 'json' 11 | }); 12 | if (!body.query.count) return msg.say('Location Not Found.'); 13 | const embed = new Discord.RichEmbed() 14 | .setColor(0x00A2E8) 15 | .setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png') 16 | .setURL(body.query.results.channel.link) 17 | .setTimestamp() 18 | .addField('City', 19 | body.query.results.channel.location.city, true) 20 | .addField('Country', 21 | body.query.results.channel.location.country, true) 22 | .addField('Region', 23 | body.query.results.channel.location.region, true) 24 | .addField('Condition', 25 | body.query.results.channel.item.condition.text, true) 26 | .addField('Temperature', 27 | `${body.query.results.channel.item.condition.temp}°F`, true) 28 | .addField('Humidity', 29 | body.query.results.channel.atmosphere.humidity, true) 30 | .addField('Pressure', 31 | body.query.results.channel.atmosphere.pressure, true) 32 | .addField('Rising', 33 | body.query.results.channel.atmosphere.rising, true) 34 | .addField('Visibility', 35 | body.query.results.channel.atmosphere.visibility, true) 36 | .addField('Wind Chill', 37 | body.query.results.channel.wind.chill, true) 38 | .addField('Wind Direction', 39 | body.query.results.channel.wind.direction, true) 40 | .addField('Wind Speed', 41 | body.query.results.channel.wind.speed, true); 42 | return message.channel.send(embed).catch(console.error); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /commands/fortnite.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const Fortnite = require("fortnite"); 4 | const fortnite = new Fortnite("f7788827-db01-4a95-be05-93f52cc62485") 5 | exports.run = async (client, message, args) => { 6 | try { 7 | const data = await fortnite.getInfo(args.splice(1).join(" "), args[0]); 8 | const embed = new Discord.RichEmbed() 9 | .setTitle(`${data.username}, on ${data.platformNameLong}`) 10 | .setURL(`https://partybus.gg/player/${data.username}`) 11 | .addField("Squads", `**Top 6 :** ${data.lifetimeStats[3].value}\n**Top 3 :** ${data.lifetimeStats[2].value}\n**Wins:** ${data.stats.p9.top1.value}\n**KD:** ${data.stats.p9.kd.value}\n**Matches Played:** ${data.stats.p9.matches.value}\n**Kills:** ${data.stats.p9.kills.value}\n**Kills Per Game:** ${data.stats.p9.kpg.value}`, true) 12 | .addField("Duo", `**Top 12 :** ${data.lifetimeStats[4].value}\n**Top 5 :** ${data.lifetimeStats[1].value}\n**Wins:** ${data.stats.p10.top1.value}\n**KD:** ${data.stats.p10.kd.value}\n**Matches Played:** ${data.stats.p10.matches.value}\n**Kills:** ${data.stats.p10.kills.value}\n**Kills Per Game:** ${data.stats.p10.kpg.value}`, true) 13 | .addField("Solo", `**Top 25 :** ${data.lifetimeStats[5].value}\n**Top 10 :** ${data.lifetimeStats[0].value}\n**Wins:** ${data.stats.p2.top1.value}\n**KD:** ${data.stats.p2.kd.value}\n**Matches Played:** ${data.stats.p2.matches.value}\n**Kills:** ${data.stats.p2.kills.value}\n**Kills Per Game:** ${data.stats.p2.kpg.value}`, true) 14 | .addBlankField() 15 | .addField("Score", data.lifetimeStats[6].value, true) 16 | .addField("Matches", data.lifetimeStats[7].value, true) 17 | .addField("Total Wins", data.lifetimeStats[8].value, true) 18 | .addField("Win Rate", data.lifetimeStats[9].value, true) 19 | .addField("Kills", data.lifetimeStats[10].value, true) 20 | .addField("KDR", data.lifetimeStats[11].value, true) 21 | .addField("Kills Per Minute", data.lifetimeStats[12].value, true) 22 | .addField("Time Played", data.lifetimeStats[13].value, true) 23 | .addField("Average Survival Time", data.lifetimeStats[14].value, true) 24 | .setColor(0x00A2E8) 25 | message.channel.send(embed) 26 | } catch (error) { 27 | message.channel.send(`Player Not Found or invalid form type.`); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /commands/unban.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 7 | const prefixtouse = row.prefix 8 | const usage = new Discord.RichEmbed() 9 | .setColor(0x00A2E8) 10 | .setThumbnail(client.user.avatarURL) 11 | .setTitle("Command: " + prefixtouse + "unban") 12 | .addField("Usage", prefixtouse + "unban ") 13 | .addField("Example", prefixtouse + "unban 130515926117253122 asked for a second chance.") 14 | .setDescription("Description: " + "Unbans a user from the current server"); 15 | 16 | if (message.member.hasPermission("BAN_MEMBERS")) { 17 | if (!message.guild.member(client.user).hasPermission('BAN_MEMBERS')) return message.reply('Sorry, i dont have the perms to do this cmd i need BAN_MEMBERS. :x:') 18 | let user = args[0] 19 | if (isNaN(user)) return message.channel.send(usage) 20 | let reason = args.slice(1).join(' ') || `Moderator didn't give a reason.`; 21 | let modlog = message.guild.channels.find('name', row.logschannel); 22 | if (reason.length < 1) return message.channel.send(usage) 23 | if (!user) return message.channel.send(usage) 24 | if (user === message.author.id) return message.channel.send(`:x: Well no you can't unban yourself`); 25 | if (message.guild.members.get(user)) return message.channel.send(`:x: That user is not banned from the server`); 26 | message.guild.unban(user, 2); 27 | sql.run(`UPDATE scores SET casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 28 | const embed = new Discord.RichEmbed() 29 | .setColor(0x00A2E8) 30 | .setTitle("Case #" + row.casenumber + " | Action: Unban") 31 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 32 | .addField("ID:", user) 33 | .addField("Reason", reason, true) 34 | .setFooter("Time used: " + message.createdAt.toDateString()) 35 | message.channel.send("User has been unbanned from the server") 36 | if (!modlog) return; 37 | if (row.logsenabled === "disabled") return; 38 | client.channels.get(modlog.id).send({embed}) 39 | } 40 | }) 41 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Attention: Ive stopped working on this bot entirely and will now be archived please use: https://github.com/Katrixerse/Corius my newer bot instead. 2 | 3 | # Orcinus 4 | Written in discord.js of course 5 | 6 | If you find any bugs please make a issue so i can look into it and fix it 7 | 8 | Made By: 9 | - SyntheticGenerations (me) 10 | 11 | Co-Owner: 12 | EthericDestruction#9748 13 | 14 | Special Thanks too: 15 | - dragonfire535 - Some api commands 16 | - YorkAARGH - How to use sqlite from this guide https://anidiotsguide_old.gitbooks.io/discord-js-bot-guide/content/coding-guides/storing-data-in-an-sqlite-file.html 17 | 18 | will use sqlite instead of jsons to store data (Better this way so it wont currupt if your bot gets in to many servers and is constantly reading/writing data), json is fine for storing static information 19 | 20 | -------------------------------------------------------- 21 | 22 | Hosting 23 | 24 | First, download all the files and put them in a folder. 25 | 26 | Need to create a new app at https://discordapp.com/developers/applications/me/create and then need to fill out the bots name and select its avatar then create it. Once done that find where is says Bot and click create a bot user and hit yes, do it 27 | 28 | Now you want to go back to bot go to token and click token: click to reveal this will show you the bot token now edit config.json in assets where it says, "token": "Your token" with your bot token once done click save. 29 | 30 | Now you have done that you will need NodeJs installed can get it from https://nodejs.org/en/ so you can start running the bot. 31 | 32 | Now right click the folder in an empty space where you put the files in then click open command prompt. 33 | 34 | Need to install each of these packages with npm install [packagename] without the brackets and replace package name with the ones below. 35 | 36 | Packages Needed 37 | 38 | - discord.js 39 | - ms 40 | - superagent 41 | - snekfetch 42 | - request 43 | - request-promise-native 44 | - urban 45 | - chrono-node 46 | - moment 47 | - windows-build-tools 48 | - node-gyp 49 | - canvas 50 | - canvas-constructor 51 | - fs-nextra 52 | - cheerio 53 | - got 54 | - sqlite 55 | - sqlite3 56 | - mathjs 57 | 58 | When done downloading the dependencies, run node Main.js, to start the bot. 59 | 60 | If there is a problem or an error please make an issue. 61 | 62 | If you want to run this bot while not having the console or terminal open, use nodemon or pm2 (ex. pm2 start Main.js) 63 | -------------------------------------------------------------------------------- /commands/99.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 7 | const usage = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .setThumbnail(client.user.avatarURL) 10 | .addField("Usage: ", "h!roll ") 11 | .addField("Example: ", "h!roll 50 1000"); 12 | var dice = Math.floor(Math.random() * 110.99 + 1); 13 | var number = parseInt(args.join('')); 14 | const wonamount = (Math.round(number * 2)) 15 | if (number.length < 1) return message.channel.send(usage); 16 | if (row.cash < number) return message.channel.send("You dont have enough money to bet that much, you have: $" + row.cash); 17 | if (number < -0) return message.channel.send("You can't bet anything below 0: you bet $" + number) 18 | if (!isFinite(number)) return message.channel.send("is not a valid number to bet") 19 | if (isNaN(number)) return message.channel.send(number + "is not a valid number to bet"); 20 | if (number.length > 6) return message.channel.send("Can not bet more then 6 numbers at a time") 21 | if (dice >= "99") { 22 | const embed = new Discord.RichEmbed() 23 | .setColor(0x00A2E8) 24 | .setTimestamp() 25 | .setTitle("The dice has rolled: " + dice) 26 | .setDescription("You have won $" + wonamount + "!") 27 | .setThumbnail("http://www.pngall.com/wp-content/uploads/2016/04/Dice-Free-Download-PNG.png") 28 | sql.run(`UPDATE profiles SET cash = ${row.cash += wonamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 29 | message.channel.send(embed).catch(console.error); 30 | } else { 31 | const embed2 = new Discord.RichEmbed() 32 | .setColor(0x00A2E8) 33 | .setTimestamp() 34 | .setTitle("The dice has rolled: " + dice) 35 | .setDescription("You have lost $" + number + "!") 36 | .setThumbnail("http://www.pngall.com/wp-content/uploads/2016/04/Dice-Free-Download-PNG.png") 37 | sql.run(`UPDATE profiles SET cash = ${row.cash -= number} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 38 | message.channel.send(embed2).catch(console.error); 39 | } 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /commands/kick.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 7 | sql.run(`UPDATE scores SET casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 8 | const prefixtouse = row.prefix 9 | const usage = new Discord.RichEmbed() 10 | .setColor(0x00A2E8) 11 | .setThumbnail(client.user.avatarURL) 12 | .setTitle("Command: " + prefixtouse + "kick") 13 | .addField("Usage", prefixtouse + "kick @Someone ") 14 | .addField("Example", prefixtouse + "kick @Someone for ad links to other discords") 15 | .setDescription("Description: " + "Kicks a user from the current server"); 16 | 17 | if (message.member.hasPermission("KICK_MEMBERS")) { 18 | if (!message.guild.member(client.user).hasPermission('KICK_MEMBERS')) return message.reply('Sorry, i dont have the perms to do this cmd i need KICK_MEMBERS. :x:') 19 | let reason = args.slice(1).join(' ') || `Moderator didn't give a reason.`; 20 | if (message.mentions.users.size < 1) return message.channel.send(usage); 21 | let user = message.guild.member(message.mentions.users.first()); 22 | if (user.highestRole.position >= message.member.highestRole.position) return message.reply('I cant kick that member. They are the same level as you or higher. :x:'); 23 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 24 | message.channel.send("***The user tagged has been successfully kicked! :white_check_mark:***") 25 | if (!message.guild.member(user).kickable) return message.reply('I can\'t kick that member :x:'); 26 | message.guild.member(user).kick(); 27 | const embed = new Discord.RichEmbed() 28 | .setColor(0x00A2E8) 29 | .setTitle("Case #" + row.casenumber + " | Action: Kick") 30 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 31 | .addField("User", user.user.tag + " (ID: " + user.user.id + ")") 32 | .addField("Reason", reason, true) 33 | .setFooter("Time used: " + message.createdAt.toDateString()) 34 | if (!modlog) return; 35 | if (row.logsenabled === "disabled") return; 36 | client.channels.get(modlog.id).send({embed}); 37 | } 38 | }) 39 | } 40 | 41 | -------------------------------------------------------------------------------- /commands/25.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 7 | const usage = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .setThumbnail(client.user.avatarURL) 10 | .addField("Usage: ", "h!roll ") 11 | .addField("Example: ", "h!roll 50 1000"); 12 | var dice = Math.floor(Math.random() * 48.99 + 1); 13 | var number = parseInt(args.join('')); 14 | const wonamount = (Math.round(number * 1.25)); 15 | if (number.length < 1) return message.channel.send(usage); 16 | if (row.cash < number) return message.channel.send("You dont have enough money to bet that much, you have: $" + row.cash); 17 | if (number < -0) return message.channel.send("You can't bet anything below 0: you bet $" + number) 18 | if (!isFinite(number)) return message.channel.send("is not a valid number to bet") 19 | if (isNaN(number)) return message.channel.send(number + "is not a valid number to bet"); 20 | if (number.length > 6) return message.channel.send("Can not bet more then 6 numbers at a time") 21 | if (dice >= "25") { 22 | const embed = new Discord.RichEmbed() 23 | .setColor(0x00A2E8) 24 | .setTimestamp() 25 | .setTitle("The dice has rolled: " + dice) 26 | .setDescription("You have won $" + wonamount + "!") 27 | .setThumbnail("http://www.pngall.com/wp-content/uploads/2016/04/Dice-Free-Download-PNG.png"); 28 | sql.run(`UPDATE profiles SET cash = ${row.cash += wonamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 29 | message.channel.send(embed).catch(console.error); 30 | } else { 31 | const embed2 = new Discord.RichEmbed() 32 | .setColor(0x00A2E8) 33 | .setTimestamp() 34 | .setTitle("The dice has rolled: " + dice) 35 | .setDescription("You have lost $" + number + "!") 36 | .setThumbnail("http://www.pngall.com/wp-content/uploads/2016/04/Dice-Free-Download-PNG.png"); 37 | sql.run(`UPDATE profiles SET cash = ${row.cash -= number} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 38 | message.channel.send(embed2).catch(console.error); 39 | } 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /commands/50.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 7 | const usage = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .setThumbnail(client.user.avatarURL) 10 | .addField("Usage: ", "h!roll ") 11 | .addField("Example: ", "h!roll 50 1000"); 12 | var dice = Math.floor(Math.random() * 75.99 + 1); 13 | var number = parseInt(args.join('')); 14 | const wonamount = (Math.round(number * 1.50)) 15 | if (number.length < 1) return message.channel.send(usage); 16 | if (row.cash < number) return message.channel.send("You dont have enough money to bet that much, you have: $" + row.cash); 17 | if (number < -0) return message.channel.send("You can't bet anything below 0: you bet $" + number) 18 | if (!isFinite(number)) return message.channel.send("is not a valid number to bet") 19 | if (isNaN(number)) return message.channel.send(number + "is not a valid number to bet"); 20 | if (number.length > 6) return message.channel.send("Can not bet more then 6 numbers at a time") 21 | if (dice >= "50") { 22 | const embed = new Discord.RichEmbed() 23 | .setColor(0x00A2E8) 24 | .setTimestamp() 25 | .setTitle("The dice has rolled: " + dice) 26 | .setDescription("You have won $" + wonamount + "!") 27 | .setThumbnail("http://www.pngall.com/wp-content/uploads/2016/04/Dice-Free-Download-PNG.png") 28 | sql.run(`UPDATE profiles SET cash = ${row.cash += wonamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 29 | message.channel.send(embed).catch(console.error); 30 | } else { 31 | const embed2 = new Discord.RichEmbed() 32 | .setColor(0x00A2E8) 33 | .setTimestamp() 34 | .setTitle("The dice has rolled: " + dice) 35 | .setDescription("You have lost $" + number + "!") 36 | .setThumbnail("http://www.pngall.com/wp-content/uploads/2016/04/Dice-Free-Download-PNG.png") 37 | sql.run(`UPDATE profiles SET cash = ${row.cash -= number} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 38 | message.channel.send(embed2).catch(console.error); 39 | } 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /commands/75.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | sql.get(`SELECT * FROM profiles WHERE guildId ="${message.guild.id}" AND userId ="${message.author.id}"`).then(row => { 7 | const usage = new Discord.RichEmbed() 8 | .setColor(0x00A2E8) 9 | .setThumbnail(client.user.avatarURL) 10 | .addField("Usage: ", "h!roll ") 11 | .addField("Example: ", "h!roll 50 1000"); 12 | var dice = Math.floor(Math.random() * 85.99 + 1); 13 | var number = parseInt(args.join('')); 14 | const wonamount = (Math.round(number * 1.75)) 15 | if (number.length < 1) return message.channel.send(usage); 16 | if (row.cash < number) return message.channel.send("You dont have enough money to bet that much, you have: $" + row.cash); 17 | if (number < -0) return message.channel.send("You can't bet anything below 0: you bet $" + number) 18 | if (!isFinite(number)) return message.channel.send("is not a valid number to bet") 19 | if (isNaN(number)) return message.channel.send(number + "is not a valid number to bet"); 20 | if (number.length > 6) return message.channel.send("Can not bet more then 6 numbers at a time") 21 | if (dice >= "75") { 22 | const embed = new Discord.RichEmbed() 23 | .setColor(0x00A2E8) 24 | .setTimestamp() 25 | .setTitle("The dice has rolled: " + dice) 26 | .setDescription("You have won $" + wonamount + "!") 27 | .setThumbnail("http://www.pngall.com/wp-content/uploads/2016/04/Dice-Free-Download-PNG.png") 28 | sql.run(`UPDATE profiles SET cash = ${row.cash += wonamount} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 29 | message.channel.send(embed).catch(console.error); 30 | } else { 31 | const embed2 = new Discord.RichEmbed() 32 | .setColor(0x00A2E8) 33 | .setTimestamp() 34 | .setTitle("The dice has rolled: " + dice) 35 | .setDescription("You have lost $" + number + "!") 36 | .setThumbnail("http://www.pngall.com/wp-content/uploads/2016/04/Dice-Free-Download-PNG.png") 37 | sql.run(`UPDATE profiles SET cash = ${row.cash -= number} WHERE guildId ="${message.guild.id}" AND userId = ${message.author.id}`); 38 | message.channel.send(embed2).catch(console.error); 39 | } 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /commands/antijoin.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | if (message.member.hasPermission("BAN_MEMBERS")) { 7 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 8 | const reason = args.join(" ") || `Moderator didn't give a reason.`; 9 | if (row.antijoin === "disabled") { 10 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 11 | sql.run(`UPDATE scores SET casenumber = ${row.casenumber + 1}, antijoin = "enabled" WHERE guildId = ${message.guild.id}`); 12 | message.channel.send("Anti-join has been enabled.") 13 | const embed = new Discord.RichEmbed() 14 | .setColor(0x00A2E8) 15 | .setTitle("Case #" + row.casenumber + " | Action: Anti Join on") 16 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 17 | .addField("In channel", message.channel.name, true) 18 | .addField("Reason", reason, true) 19 | .setFooter("Time used: " + message.createdAt.toDateString()) 20 | if (!modlog) return; 21 | if (row.logsenabled === "disabled") return; 22 | client.channels.get(modlog.id).send({embed}); 23 | } else { 24 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 25 | sql.run(`UPDATE scores SET casenumber = ${row.casenumber + 1}, antijoin = "disabled" WHERE guildId = ${message.guild.id}`); 26 | message.channel.send("Anti-join has been disabled.") 27 | const embed = new Discord.RichEmbed() 28 | .setColor(0x00A2E8) 29 | .setTitle("Case #" + row.casenumber + " | Action: Anti Join off") 30 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 31 | .addField("In channel", message.channel.name, true) 32 | .addField("Reason", reason, true) 33 | .setFooter("Time used: " + message.createdAt.toDateString()) 34 | if (!modlog) return; 35 | if (row.logsenabled === "disabled") return; 36 | client.channels.get(modlog.id).send({embed}).catch(console.error); 37 | } 38 | }) 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /commands/ban.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = (client, message, args) => { 6 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 7 | const prefixtouse = row.prefix 8 | const usage = new Discord.RichEmbed() 9 | .setColor(0x00A2E8) 10 | .setThumbnail(client.user.avatarURL) 11 | .setTitle("Command: " + prefixtouse + "ban") 12 | .addField("Usage", prefixtouse + "ban @Someone ") 13 | .addField("Example", prefixtouse + "ban @Someone for ad links to other discords") 14 | .setDescription("Description: " + "Bans a user from the current server"); 15 | 16 | if (message.member.hasPermission("BAN_MEMBERS")) { 17 | if (!message.guild.member(client.user).hasPermission('BAN_MEMBERS')) return message.reply('Sorry, i dont have the perms to do this cmd i need BAN_MEMBERS. :x:') 18 | if (message.mentions.users.size < 1) return message.channel.send(usage) 19 | let user = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args.slice(0).join(" ")); 20 | if (user.highestRole.position >= message.member.highestRole.position) return message.reply('I cant ban that member. They are the same level as you or higher. :x:'); 21 | let reason = args.slice(1).join(' ') || `Moderator didn't give a reason.`; 22 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 23 | if (!message.guild.member(user).bannable) return message.reply(' I cant ban that member. This may be happening because they are above me. :x:'); 24 | message.guild.ban(user, 2); 25 | message.channel.send("***The User has been successfully banned! :white_check_mark:***") 26 | sql.run(`UPDATE scores SET casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 27 | 28 | const embed = new Discord.RichEmbed() 29 | .setColor(0x00A2E8) 30 | .setTitle("Case #" + row.casenumber + " | Action: Ban") 31 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 32 | .addField("User", user.user.tag + " (ID: " + user.user.id + ")") 33 | .addField("Reason", reason, true) 34 | .setFooter("Time used: " + message.createdAt.toDateString()) 35 | if (!modlog) return; 36 | if (row.logsenabled === "disabled") return; 37 | client.channels.get(modlog.id).send({embed}); 38 | } 39 | }) 40 | } 41 | -------------------------------------------------------------------------------- /commands/hackban.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | exports.run = async (client, message, args) => { 6 | sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => { 7 | const prefixtouse = row.prefix 8 | const usage = new Discord.RichEmbed() 9 | .setColor(0x00A2E8) 10 | .setThumbnail(client.user.avatarURL) 11 | .setTitle("Command: " + prefixtouse + "hackban") 12 | .addField("Usage", prefixtouse + "hackban ") 13 | .addField("Example", prefixtouse + "hackban 130515926117253122 self bot that dms server links and left.") 14 | .setDescription("Description: " + "Bans a user without needing to be in the server"); 15 | 16 | if (message.member.hasPermission("BAN_MEMBERS")) { 17 | if (!message.guild.member(client.user).hasPermission('BAN_MEMBERS')) return message.reply('Sorry, i dont have the perms to do this cmd i need BAN_MEMBERS. :x:') 18 | let user = args[0] 19 | if (isNaN(user)) return message.channel.send(usage) 20 | let reason = args[1] || `Moderator didn't give a reason.`; 21 | if (isNaN(user)) return message.channel.send(usage) 22 | if (!user) return message.reply('You must supply a User Resolvable, such as a user id.') 23 | let guild = message.member.guild; 24 | if (user.length < 1) return message.channel.send("need to provide a valid user id to ban them"); 25 | if (user === message.author.id) return message.channel.send(`:x: Well no you can't hackban yourself`); 26 | if (message.guild.members.get(user)) return message.channel.send(`:x: That user is in this server, please use ban instead`); 27 | let modlog = message.guild.channels.find(channel => channel.name == row.logschannel); 28 | message.guild.ban(user, 2); 29 | sql.run(`UPDATE scores SET casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`); 30 | const embed = new Discord.RichEmbed() 31 | .setColor(0x00A2E8) 32 | .setTitle("Case #" + row.casenumber + " | Action: Hack Ban") 33 | .addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")") 34 | .addField("User ID", user) 35 | .addField("Reason", reason, true) 36 | .setFooter("Time used: " + message.createdAt.toDateString()) 37 | message.channel.send("ID: " + user + ", has been banned from the server.") 38 | if (!modlog) return; 39 | client.channels.get(modlog.id).send({embed}); 40 | } 41 | }) 42 | } 43 | 44 | -------------------------------------------------------------------------------- /commands/leaderboard.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const bot = new Discord.Client(); 3 | const sql = require("sqlite"); 4 | sql.open("./assets/guildsettings.sqlite"); 5 | var n = 0; 6 | var y = 0; 7 | exports.run = async (client, message, args) => { 8 | const choice = args[0] 9 | if (choice < 1) return message.channel.send("Did not select a leaderboard (options: cash, level)") 10 | if (choice === "cash" || choice === "money") { 11 | sql.all(`SELECT username,userId,cash,bank FROM profiles WHERE guildId ="${message.guild.id}" ORDER BY cash DESC LIMIT 10`).then(rows => { 12 | if (!rows) return message.channel.send("No one has earned cash."); 13 | var leaders = ''; 14 | rows.forEach(function (row) { 15 | if (leaders.includes(`${row.username}`)) return; 16 | function increment(){ 17 | y+= 1; 18 | return y; 19 | } 20 | leaders += `${increment()}: ${row.username}, total money: $${row.cash + row.bank}\n` 21 | }) 22 | message.channel.send({ 23 | embed: { 24 | title: message.guild.name + " leaderboard Top " + y, 25 | color: 3447003, 26 | description: `${leaders}` 27 | } 28 | }) 29 | y = 0; 30 | }) 31 | } else if (choice === "level" || choice === "levels" || choice === "xp") { 32 | sql.all(`SELECT username,userId,level,xp FROM profiles WHERE guildId ="${message.guild.id}" ORDER BY xp DESC LIMIT 10`).then(rows => { 33 | if (!rows) return message.channel.send("No one has earned xp."); 34 | var leaders = ''; 35 | rows.forEach(function (row) { 36 | if (leaders.includes(`${row.username}`)) return; 37 | function increment(){ 38 | n+= 1; 39 | return n; 40 | } 41 | leaders += `${increment()}: ${row.username}, level: ${row.level} (XP: ${row.xp})\n` 42 | }) 43 | message.channel.send({ 44 | embed: { 45 | title: message.guild.name + " leaderboard Top " + n, 46 | color: 3447003, 47 | description: `${leaders}` 48 | } 49 | }) 50 | n = 0; 51 | }) 52 | } else { 53 | message.channel.send("Did not select a valid leaderboard (options: cash, level)") 54 | } 55 | } 56 | 57 | --------------------------------------------------------------------------------