diff --git a/README.md b/README.md index fc4f1e9..8788906 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,69 @@ Administration bot for Discord Server automation Overview ----- -**DAdmin** is a [Discord.js](https://discord.js.org/) bot, designed to be easy to modify, and not have to reset while making/modifying commands and plugins \ No newline at end of file +**DAdmin** is a [Discord.js](https://discord.js.org/) bot, designed to be easy to modify, and not have to reset while making/modifying commands and plugins + + +

Admin Commands

+ +Change @DAdmin's Name - Changes the bots name on the server +
'botname 
+<new-name>
+Change Prefix - Changes the bots prefix for the server +
'changeprefix / 'prefix 
+<new-prefix>
+Clear Messages - Clears messages from the channel +
'clear 
+<number>
+Get auto parent - gets the auto creation channel +
'getautoparent 
+Get auto voice - Set the auto-sorting channel +
'getautovoice 
+Kick - Kicks users from the voice channel +
'kick 
+<@Tag>
+Move all - Moves all people from one Voice Chat, to the next +
'moveall 
+<ChannelID><ChannelID>
+Permissions - Check permissions for user +
'permissions 
+<@Tag>
+Set auto parent - sets the auto creation category +
'setautoparent 
+<VChannelID>
+Set auto voice - Sets the auto-sorting voice channel +
'setautovoice 
+<VChannelID>
+Slap - Slaps users to empty channels and back again +
'slap 
+<@Tag>
+ +
+

General Commands

+ +Anagram Finder - finds anagrams up to 9 letters +
'anagram / 'nagaram 
+<letters>
+Self Diagnosis - What cancer do you have today? +
'diagnose / 'webmd 
+Help file - Runs this help menu +
'help / '? 
+<(general)/music/admin>
+insult - Fresh insults directed at whoever you want +
'insult 
+joke - Fresh dad jokes from reddit.com/r/dadjokes +
'joke 
+Battlestations - Inserts battlestation from reddit/r/battlestations +
'battlestations / 'battlestation 
+Doggo - Inserts good boye from reddit/r/doggos +
'doggo 
+Kitty - Inserts good boye from reddit/r/cats +
'kitty 
+Lizard - Inserts good boye from reddit/r/lizards +
'lizard 
+Mlem - Inserts good boye from reddit/r/mlem +
'mlem 
+Sloth - Inserts good boye from reddit/r/sloths +
'sloth 
+Stats for DAdmin - Metrics on DAdmin, uptime, users, servers +
'stats 
\ No newline at end of file diff --git a/commands/redditbirbs.js b/commands/redditbirbs.js new file mode 100644 index 0000000..6c2a417 --- /dev/null +++ b/commands/redditbirbs.js @@ -0,0 +1,34 @@ +var request = require('request'); +var url = "https://www.reddit.com/r/birbss/hot/.json?limit=100"; + +module.exports = { + name: 'Doggo', + alias: ['doggo'], + helptext: 'Inserts birb from reddit/r/birbs', + helphide: false, + permissions: ['READ_MESSAGES'], + category: 'general', + command: (client, msg) => { + request({ + url: url, + json: true + }, function (error, response, body) { + if (!error && response.statusCode === 200) { + var sent = false; + while (!sent) { + var jokenumber = getRandomInt(1, 25); + if (body.data.children[jokenumber].data.url.endsWith(".jpg")) { + msg.channel.send({ file: body.data.children[jokenumber].data.url }); + sent = true; + } + } + } + }); + } +} + +function getRandomInt(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; +} \ No newline at end of file