From ec75863f7b0eeade92d9e921a04ec9ce0511fd88 Mon Sep 17 00:00:00 2001 From: TheEdgeNK Date: Wed, 27 Jun 2018 18:11:57 -0400 Subject: welcome to 2.0 alpha 1 --- commands/Fun/cureboredom.js | 45 ----------- commands/Fun/findmyphone.js | 36 --------- commands/Fun/gamble.js | 71 ------------------ commands/Fun/og151.js | 176 -------------------------------------------- commands/Fun/slots.js | 71 ++++++++++++++++++ commands/Fun/story.js | 47 ------------ 6 files changed, 71 insertions(+), 375 deletions(-) delete mode 100644 commands/Fun/cureboredom.js delete mode 100644 commands/Fun/findmyphone.js delete mode 100644 commands/Fun/gamble.js delete mode 100644 commands/Fun/og151.js create mode 100644 commands/Fun/slots.js delete mode 100644 commands/Fun/story.js (limited to 'commands/Fun') diff --git a/commands/Fun/cureboredom.js b/commands/Fun/cureboredom.js deleted file mode 100644 index 4b99406..0000000 --- a/commands/Fun/cureboredom.js +++ /dev/null @@ -1,45 +0,0 @@ -/** ************************************** - * - * CureBoredom: Plugin for PokeBot that "cures" your boredom. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = (bot, msg, args) => { - const ideas = [ - 'Pokemon Go to the polls :ballot_box:', - 'Consuming Maccas :fries:', - 'Fighting AstralMod :right_facing_fist:', - 'Joining a team :handshake:', - 'Have a battle :crossed_swords:', - 'Playing The Peacenet :peace:', - 'Becoming Tyson :computer:', - 'Finding Bugs :bug:', - 'Being with Ayana :couple:', - 'Playing OS dressup :womans_clothes:', - 'Chatting with friends :speech_balloon:', - 'Livestreaming :satellite:', - 'Programming a Discord Bot :man_dancing:', - 'Listening to Anders Enger Jensen :musical_note:', - 'Messing with Rich Presence :gear:', - 'Making videos :movie_camera:', - 'Taking pictures :camera:', - 'Suggesting things for the server :dancers:', - ]; - - if (args[0] === 'list') return msg.channel.send(ideas.join('\n')); - - msg.channel.send(ideas[Math.floor(Math.random() * ideas.length)]); -}; - -exports.conf = { - aliases: ['cboredom'], - guildOnly: true, -}; - -exports.help = { - name: 'cureboredom', - description: 'Finds you something to do.', -}; diff --git a/commands/Fun/findmyphone.js b/commands/Fun/findmyphone.js deleted file mode 100644 index 135d449..0000000 --- a/commands/Fun/findmyphone.js +++ /dev/null @@ -1,36 +0,0 @@ -/** ************************************** - * - * FindMyPhone: Plugin for PokeBot that "helps you find your phone". - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = (bot, msg) => { - const cities = [ - 'Aurora', - 'Montgomery', - 'Chandler', - 'Boise', - 'Fresno', - 'Lubbock', - 'Miami', - 'Stockton', - 'Colorado Springs', - 'Portland', - 'Cincinnati', - ]; - - msg.channel.send(cities[Math.floor(Math.random() * cities.length)]); -}; - -exports.conf = { - aliases: ['findphone', 'findmyiphone', 'findmyandroid', 'findmyandroidphone'], - guildOnly: true, -}; - -exports.help = { - name: 'findmyphone', - description: 'Find your phone. Not just a random list of cities being randomly picked.', -}; diff --git a/commands/Fun/gamble.js b/commands/Fun/gamble.js deleted file mode 100644 index 7921993..0000000 --- a/commands/Fun/gamble.js +++ /dev/null @@ -1,71 +0,0 @@ -/** ************************************** - * - * Slots: Plugin for PokeBot that allows you to gamble. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * TLicensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = async (bot, msg) => { - const slotNumbers = [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - ]; - - const balance = await bot.plugins.economy.get(msg.author.id); - if (balance < 10) return await msg.reply('You don\'t have enough credits (10) to play the slots'); - - const number1 = slotNumbers[Math.floor(Math.random() * slotNumbers.length)]; - const number2 = slotNumbers[Math.floor(Math.random() * slotNumbers.length)]; - const number3 = slotNumbers[Math.floor(Math.random() * slotNumbers.length)]; - - - if (number2 == number1 + 1 && number3 == number2 + 1) { - await bot.plugins.economy.add(msg.author.id, 1000); - const balance = await bot.plugins.economy.get(msg.author.id); - return await msg.channel.send('You won 1000 credits!\nCurrent Balance: ' + balance + ' \n> ' + emojify(number1, number2, number3)); - } - else if (number2 == number3 - 1 && number1 == number2 - 1) { - await bot.plugins.economy.add(msg.author.id, 1500); - const balance = await bot.plugins.economy.get(msg.author.id); - return await msg.channel.send('You won 1500 credits!\nCurrent Balance: ' + balance + ' \n> ' + emojify(number1, number2, number3)); - } - else { - await bot.plugins.economy.subtract(msg.author.id, 10); - const balance = await bot.plugins.economy.get(msg.author.id); - return await msg.channel.send('Aww, you lost! Better luck next time.\nCurrent Balance: ' + balance + ' \n> ' + emojify(number1, number2, number3)); - } -}; - -function emojify(number1, number2, number3) { - return emote(number1) + ' ' + emote(number2) + ' ' + emote(number3); -} - -function emote(number) { - if (number == 1) return ':one:'; - if (number == 2) return ':two:'; - if (number == 3) return ':three:'; - if (number == 4) return ':four:'; - if (number == 5) return ':five:'; - if (number == 6) return ':six:'; - if (number == 7) return ':seven:'; - if (number == 8) return ':eight:'; - if (number == 9) return ':nine:'; -} -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'gamble', - description: 'Develop a gambling addiction by playing Slots!', -}; diff --git a/commands/Fun/og151.js b/commands/Fun/og151.js deleted file mode 100644 index d2b3ccf..0000000 --- a/commands/Fun/og151.js +++ /dev/null @@ -1,176 +0,0 @@ -/** ************************************** - * - * og151: Plugin for PokeBot that randomly picks 1 out of the original 151 Pokemon. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = (bot, msg) => { - const pokemon = [ - 'Abra', - 'Aerodactyl', - 'Alakazam', - 'Arbok', - 'Arcanine', - 'Articuno', - 'Beedrill', - 'Bellsprout', - 'Blastoise', - 'Bulbasaur', - 'Butterfree', - 'Caterpie', - 'Chansey', - 'Charizard', - 'Charmander', - 'Charmeleon', - 'Clefable', - 'Clefairy', - 'Cloyster', - 'Cubone', - 'Dewgong', - 'Diglett', - 'Ditto', - 'Dodrio', - 'Doduo', - 'Dragonair', - 'Dragonite', - 'Dratini', - 'Drowzee', - 'Dugtrio', - 'Eevee', - 'Ekans', - 'Electabuzz', - 'Electrode', - 'Exeggcute', - 'Exeggutor', - 'Farfetch’d', - 'Fearow', - 'Flareon', - 'Gastly', - 'Gengar', - 'Geodude', - 'Gloom', - 'Golbat', - 'Goldeen', - 'Golduck', - 'Golem', - 'Graveler', - 'Grimer', - 'Growlithe', - 'Gyarados', - 'Haunter', - 'Hitmonchan', - 'Hitmonlee', - 'Horsea', - 'Hypno', - 'Ivysaur', - 'Jigglypuff', - 'Jolteon', - 'Jynx', - 'Kabuto', - 'Kabutops', - 'Kadabra', - 'Kakuna', - 'Kangaskhan', - 'Kingler', - 'Koffing', - 'Krabby', - 'Lapras', - 'Lickitung', - 'Machamp', - 'Machoke', - 'Machop', - 'Magikarp', - 'Magmar', - 'Magnemite', - 'Magneton', - 'Mankey', - 'Marowak', - 'Meowth', - 'Metapod', - 'Mew', - 'Mewtwo', - 'Moltres', - 'Mr. Mime', - 'Muk', - 'Nidoking', - 'Nidoqueen', - 'Nidoran♀', - 'Nidoran♂', - 'Nidorina', - 'Nidorino', - 'Ninetales', - 'Oddish', - 'Omanyte', - 'Omastar', - 'Onix', - 'Paras', - 'Parasect', - 'Persian', - 'Pidgeot', - 'Pidgeotto', - 'Pidgey', - 'Pikachu', - 'Pinsir', - 'Poliwag', - 'Poliwhirl', - 'Poliwrath', - 'Ponyta', - 'Porygon', - 'Primeape', - 'Psyduck', - 'Raichu', - 'Rapidash', - 'Raticate', - 'Rattata', - 'Rhydon', - 'Rhyhorn', - 'Sandshrew', - 'Sandslash', - 'Scyther', - 'Seadra', - 'Seaking', - 'Seel', - 'Shellder', - 'Slowbro', - 'Slowpoke', - 'Snorlax', - 'Spearow', - 'Squirtle', - 'Starmie', - 'Staryu', - 'Tangela', - 'Tauros', - 'Tentacool', - 'Tentacruel', - 'Vaporeon', - 'Venomoth', - 'Venonat', - 'Venusaur', - 'Victreebel', - 'Vileplume', - 'Voltorb', - 'Vulpix', - 'Wartortle', - 'Weedle', - 'Weepinbell', - 'Weezing', - 'Wigglytuff', - 'Zapdos', - 'Zubat', - ]; - - msg.channel.send(pokemon[Math.floor(Math.random() * pokemon.length)]); -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'og151', - description: 'Randomly picks one of the generation 1 pokemon, and gives you its name.', -}; diff --git a/commands/Fun/slots.js b/commands/Fun/slots.js new file mode 100644 index 0000000..ddd6757 --- /dev/null +++ b/commands/Fun/slots.js @@ -0,0 +1,71 @@ +/** ************************************** + * + * Slots: Plugin for PokeBot that allows you to gamble. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * TLicensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.run = async (bot, msg) => { + const slotNumbers = [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + ]; + + const balance = await bot.plugins.economy.get(msg.author.id); + if (balance < 10) return await msg.reply('You don\'t have enough credits (10) to play the slots'); + + const number1 = slotNumbers[Math.floor(Math.random() * slotNumbers.length)]; + const number2 = slotNumbers[Math.floor(Math.random() * slotNumbers.length)]; + const number3 = slotNumbers[Math.floor(Math.random() * slotNumbers.length)]; + + + if (number2 == number1 + 1 && number3 == number2 + 1) { + await bot.plugins.economy.add(msg.author.id, 1000); + const balance = await bot.plugins.economy.get(msg.author.id); + return await msg.channel.send('You won 1000 credits!\nCurrent Balance: ' + balance + ' \n> ' + emojify(number1, number2, number3)); + } + else if (number2 == number3 - 1 && number1 == number2 - 1) { + await bot.plugins.economy.add(msg.author.id, 1500); + const balance = await bot.plugins.economy.get(msg.author.id); + return await msg.channel.send('You won 1500 credits!\nCurrent Balance: ' + balance + ' \n> ' + emojify(number1, number2, number3)); + } + else { + await bot.plugins.economy.subtract(msg.author.id, 10); + const balance = await bot.plugins.economy.get(msg.author.id); + return await msg.channel.send('Aww, you lost! Better luck next time.\nCurrent Balance: ' + balance + ' \n> ' + emojify(number1, number2, number3)); + } +}; + +function emojify(number1, number2, number3) { + return emote(number1) + ' ' + emote(number2) + ' ' + emote(number3); +} + +function emote(number) { + if (number == 1) return ':one:'; + if (number == 2) return ':two:'; + if (number == 3) return ':three:'; + if (number == 4) return ':four:'; + if (number == 5) return ':five:'; + if (number == 6) return ':six:'; + if (number == 7) return ':seven:'; + if (number == 8) return ':eight:'; + if (number == 9) return ':nine:'; +} +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'slots', + description: 'Develop a gambling addiction by playing Slots!', +}; diff --git a/commands/Fun/story.js b/commands/Fun/story.js deleted file mode 100644 index c35e3e7..0000000 --- a/commands/Fun/story.js +++ /dev/null @@ -1,47 +0,0 @@ -/** ************************************** - * - * Story: Plugin for PokeBot that tells the user a story. - * Copyright (C) 2018 TheEdge, jtsshieh, Alee - * - * Licensed under the Open Software License version 3.0 - * - * *************************************/ - -exports.run = async (bot, msg) => { - msg.guild.fetchMembers().then(guild => - { - const membersList = guild.members.array(); - const selectedUser1 = membersList[Math.floor(Math.random() * membersList.length)].user; - const selectedUser2 = membersList[Math.floor(Math.random() * membersList.length)].user; - const selectedUser3 = membersList[Math.floor(Math.random() * membersList.length)].user; - const selectedUser4 = membersList[Math.floor(Math.random() * membersList.length)].user; - - const stories = - [ - `${selectedUser1.username} bought ${selectedUser2.username} his favorite video game. This game is called "Pokemon". Then, they became best friends.`, - `${selectedUser1.username} wants to become a Pokemon trainer, but he needs to get a Pokemon first!`, - `One day, ${selectedUser1.username} decided to go to a shop. He took his motorbike. Once he arrived at the shop, he went inside. He headed right, towards the chips. He grabbed a packet, and headed to check-out. He bumped into ${selectedUser2.username} at the counter, and decided to say hi. They had a little chat, and then decided to gossip about ${selectedUser3.username}. Then, as they were saying some horrible things about ${selectedUser3.username}, they unexpectedly showed up! Then, ${selectedUser1.username} and ${selectedUser2.username} got into a fight against ${selectedUser3.username}.\n\nKids, this is why you don't start drama.\nNow ${selectedUser1.username}, ${selectedUser2.username}, and ${selectedUser3.username} are no longer friends.`, - `At a point in time, ${selectedUser1.username} was battling ${selectedUser2.username} for a gym. ${selectedUser1.username} chose Sylveon to battle, when ${selectedUser2.username} chose their trusty Eevee. First, Eevee used Tackle, when Sylveon went in for Draining Kiss. Then, ${selectedUser2.username} shouted an expletive. Once they shouted it, ${selectedUser3.username} came inside the room. ${selectedUser3.username} does not like expletives, so they got into an arguement about them. Soon enough, vicr123 got in here too and started using "-" in place of expletives during the argument. Eventually, ${selectedUser2.username} and ${selectedUser3.username} were shouting expletives at each-other, vicr123 was audibly shouting "Dash! Dash you!", while ${selectedUser1.username} was smashing his head on his desk.`, - `It was the day of the release of Pokemon Ultra Sun and Ultra Moon. ${selectedUser1.username} and ${selectedUser2.username} decided to go to GameStop to wait in line to grab their pre-order copies. Then, ${selectedUser3.username} came along, and got mad once they realised ${selectedUser1.username} and ${selectedUser2.username} had pre-orders, when ${selectedUser3.username} did not. Eventually, ${selectedUser3.username} started physically assaulting ${selectedUser1.username} when they came outside with their pre-order copy. Then, known police officer ${selectedUser4.username} came up to ${selectedUser3.username} and ${selectedUser1.username} and charged them both for Indecent Exposure, and Assault of the Second Degree.\n\nMoral of the story: Do not get into an assualt over a video-game, like ${selectedUser3.username} and ${selectedUser1.username} did.`, - `${selectedUser1.username} played this new game called Pokemon (this is back in 1996) and his friend ${selectedUser2.username} also bought that game. And then Victor Tran decided to say "Ooh! What's that game". Then ${selectedUser2.username} said "It's Pokemon!". Then Victor said "- you...", after that ${selectedUser1.username} facepalmed.`, - ]; - const storySelected = [Math.floor(Math.random() * stories.length)]; - const { RichEmbed } = require('discord.js'); - const embed = new RichEmbed() - .setColor(0x00ae86) - .setTitle('PokeBot Storytime') - .setDescription(stories[storySelected]) - .setFooter('PokeBot v1.0'); - msg.channel.send({ embed }); - }); -}; - -exports.conf = { - aliases: ['storytime'], - guildOnly: true, -}; - -exports.help = { - name: 'story', - description: 'Tells you a story.', -}; -- cgit v1.2.3