]> git.lizzy.rs Git - furrybot-discord.git/commitdiff
Implement NSFW
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 6 Mar 2022 12:48:10 +0000 (13:48 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 6 Mar 2022 12:48:10 +0000 (13:48 +0100)
basic.js
common.js
death.js
marriage.js
nsfw.js
waifu.js

index e4b5e6445555eb1d786400d0bb61c0be0d7162f4..6c45b041bd65a901716715c7d857a76305426bfc 100644 (file)
--- a/basic.js
+++ b/basic.js
@@ -6,7 +6,7 @@ module.exports = {
                help: "Display help for a commands or show list of available commands",
                func: (msg, [cmd], {commands}) => {
                        cmd = cmd && common.stripPings(cmd)
-                       
+
                        if (cmd) {
                                let def = commands[cmd]
 
index 46fe05a59fb5dfc774524a87588650cf5edcc456..d06566d212406b3b34097f73eb33b9ac5b201b1d 100644 (file)
--- a/common.js
+++ b/common.js
@@ -9,7 +9,7 @@ const getPing = module.exports.getPing = (msg, ping, allowSelf) => {
                        msg.reply("Please mention a user other than yourself")
                        return
                }
-               
+
                if (msg.guild.members.cache.get(id))
                        return id
        }
@@ -19,24 +19,27 @@ const getPing = module.exports.getPing = (msg, ping, allowSelf) => {
 
 module.exports.uppercase = str => str.slice(0, 1).toUpperCase() + str.slice(1)
 
-module.exports.requestCommand = (help, onRequest, onAccept) => new Object({
+module.exports.requestCommand = (help, info, onRequest, onAccept) => new Object({
        params: "<player>",
-       help: "Request to " + help + " another user",
+       help: "Request to " + help,
        func: (msg, [targetPing], {requests}) => {
                const target = getPing(msg, targetPing, false)
 
                if (target) {
                        const err = onRequest(msg, target)
 
-                       if (err)
+                       if (err) {
                                msg.reply(err)
-                       else
+                       } else {
+                               msg.channel.send(`<@!${target}>: <@!${msg.author.id}> ${info}. Type !accept to accept or !deny to deny.`)
+
                                requests[target] = {
                                        origin: msg.author.id,
                                        func: onAccept,
                                }
+                       }
                }
-                       
+
        }
 })
 
@@ -103,4 +106,3 @@ module.exports.listChangeCommand = (action, list, status) => new Object({
 })
 
 module.exports.stripPings = str => str.replace(/@/g, "\@")
-
index a4e65f330432313e3b533832c7e0bbc371c4c1de..bb694fe7c5b5b4f51e9e3bc1dfcc7ead01c0794d 100644 (file)
--- a/death.js
+++ b/death.js
@@ -21,7 +21,7 @@ module.exports = {
        },
        die: {
                func: msg => {
-                       google_images.searchRandom("die+meme")  
+                       google_images.searchRandom("die+meme")
                                .then(result => msg.channel.send(util.format(common.choose(deathmessages), `<@!${msg.author.id}>`) + `\n${result.image.url}`))
                }
        },
index f4704b47cb0b949f7e60670cf3241891acf24dcd..9a9d7ff80fca1e2b33756076f11dfb57df9b2d5d 100644 (file)
@@ -3,15 +3,13 @@ const google_images = require("free-google-images")
 let marriages = common.storageLoad("marriages") || {}
 
 module.exports = {
-       marry: common.requestCommand("marry another user", (msg, target) => {
+       marry: common.requestCommand("marry another user", "is proposing to you", (msg, target) => {
                const origin = msg.author.id
-       
+
                if (marriages[origin])
                        return `You are already married to <@!${marriages[origin]}>.`
                else if (marriages[target])
                        return `<@!${target}> is already married to <@!${marriages[target]}>.`
-               else
-                       msg.channel.send(`<@!${target}>: <@!${origin}> is proposing to you. Type !accept to accept or !deny to deny.`)
        }, (msg, origin) => {
                const target = msg.author.id
 
diff --git a/nsfw.js b/nsfw.js
index 52bb43c64f7cb720aebc2a009779797cbd751963..8e745110f88acc4600c1ad424f232b2c0afb34e1 100644 (file)
--- a/nsfw.js
+++ b/nsfw.js
@@ -1,7 +1,8 @@
 const pseudoRandom = require("pseudo-random")
+const google_images = require("free-google-images")
 const common = require("./common.js")
 
-const asciiGenital = (id, begin, middle, ending) => 
+const asciiGenital = (id, begin, middle, ending) =>
        begin + middle.repeat(2 + Math.floor(pseudoRandom(id).random() * (10 - 2 + 1))) + ending
 
 const asciiDick = id => asciiGenital(id + 1, "8", "=", "D")
@@ -28,32 +29,21 @@ module.exports = {
                                msg.reply(`${asciiBoob(target)}    ← <@!${target}>'s Boobs'`)
                }
        },
+       smellfeet: common.requestCommand("smell another user's feet", "wants to smell your feet", _ => {},
+               (msg, origin) => google_images.searchRandom("feet")
+                       .then(result => msg.channel.send(`<@!${origin}> is smelling <@!${msg.author.id}>'s feet. They are kinda stinky!\n${result.image.url}`))
+       ),
+       blowjob: common.requestCommand("suck another user's dick", "wants to suck your dick", _ => {},
+               (msg, origin) => google_images.searchRandom("blowjob+meme")
+                       .then(result => msg.channel.send(`<@!${origin}> is sucking <@!${msg.author.id}>'s cock. ${asciiDick(msg.author.id)} ˣoˣ \n${result.image.url}`))
+       ),
+       sex: common.requestCommand("have sex with another user", "wants to fuck you", _ => {},
+               (msg, origin) => google_images.searchRandom("sex+meme")
+                       .then(result => msg.channel.send(`<@!${origin}> and <@!${msg.author.id}> are having sex! OwO.\n${result.image.url}`))
+       ),
+       cum: {
+               help: "Ejaculate.",
+               func: msg => google_images.searchRandom("cum+meme")
+                       .then(result => msg.channel.send(`<@!${msg.author.id}> is cumming: ${asciiDick(msg.author.id)}${"~".repeat(1 + Math.floor(Math.random() * 10))}\n${result.image.url}`))
+       },
 }
-
-/*
-
-furrybot.request_command("smellfeet", "smell another player's feet", function(name, target)
-       furrybot.ping_message(target, name .. " wants to smell your feet. Type !accept to accept or !deny to deny.", furrybot.colors.system)
-end, function(name, target)
-       furrybot.ping_message(name, " you are smelling " .. target .. "'s feet. They are kinda stinky!", furrybot.colors.roleplay)
-end)
-
-furrybot.request_command("blowjob", "suck another player's dick", function(name, target)
-       furrybot.ping_message(target, name .. " wants to suck your dick. Type !accept to accept or !deny to deny.", furrybot.colors.system)
-end, function(name, target)
-       furrybot.send(name .. " is sucking " .. target .. "'s cock. " .. furrybot.get_ascii_dick(target) .. " ˣoˣ ", furrybot.colors.roleplay)
-end)
-
-furrybot.request_command("sex", "have sex with another player", function(name, target)
-       furrybot.ping_message(target, name .. " wants to have sex with you. Type !accept to accept or !deny to deny.", furrybot.colors.system)
-end, function(name, target)
-       furrybot.send(name .. " and " .. target .. " are having sex! OwO", furrybot.colors.roleplay)
-end)
-
-furrybot.commands.cum = {
-       help = "Cum",
-       func = function(name)
-               furrybot.send(name .. " is cumming: " .. furrybot.get_ascii_dick(name) .. C("#FFFFFF") .. furrybot.repeat_string("~", math.random(1, 10)), furrybot.colors.roleplay)
-       end
-}
-*/
index 306c716aee75524c103bcc58c870c9ee4532f22d..757009aed257d0f3a8bc0ad082c7ec5cccbc9264 100644 (file)
--- a/waifu.js
+++ b/waifu.js
@@ -102,7 +102,7 @@ const waifu = id => {
        }
 }
 
-const formatWaifu = waifu => 
+const formatWaifu = waifu =>
 `__**${waifu.name}**__
        **Age:** ${waifu.age || "Unknown"}
        **Gender:** ${waifu.gender}