From 34d0cf9d14647c088a2683153b92c7d72bb21614 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 6 Mar 2022 13:48:10 +0100 Subject: [PATCH] Implement NSFW --- basic.js | 2 +- common.js | 16 +++++++++------- death.js | 2 +- marriage.js | 6 ++---- nsfw.js | 48 +++++++++++++++++++----------------------------- waifu.js | 2 +- 6 files changed, 33 insertions(+), 43 deletions(-) diff --git a/basic.js b/basic.js index e4b5e64..6c45b04 100644 --- 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] diff --git a/common.js b/common.js index 46fe05a..d06566d 100644 --- 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: "", - 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, "\@") - diff --git a/death.js b/death.js index a4e65f3..bb694fe 100644 --- 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}`)) } }, diff --git a/marriage.js b/marriage.js index f4704b4..9a9d7ff 100644 --- a/marriage.js +++ b/marriage.js @@ -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 52bb43c..8e74511 100644 --- 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 -} -*/ diff --git a/waifu.js b/waifu.js index 306c716..757009a 100644 --- 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} -- 2.44.0