diff options
-rw-r--r-- | basic.js | 4 | ||||
-rw-r--r-- | common.js | 6 | ||||
-rw-r--r-- | init.js | 6 | ||||
-rw-r--r-- | nsfw.js (renamed from nsfw.lua) | 66 |
4 files changed, 45 insertions, 37 deletions
@@ -1,8 +1,12 @@ +const common = require("./common.js") + module.exports = { help: { params: "[<command>]", 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] @@ -101,3 +101,9 @@ module.exports.listChangeCommand = (action, list, status) => new Object({ } } }) + +module.exports.stripPings = str => str + .replace(/<@!/g, "<@!") + .replace(/<@&/g, "<@&") + .replace(/@here/g, "@here") + .replace(/@everyone/g, "@everyone") @@ -17,7 +17,7 @@ let fb = { client.on("messageCreate", msg => { if (msg.author.id != client.user.id && msg.content.startsWith("!") && !fb.ignored[msg.author.id]) { let args = msg.content.slice(1).split(" ") - let cmd = args.shift() + let cmd = common.stripPings(args.shift()) let def = fb.commands[cmd] if (def) { @@ -31,8 +31,8 @@ client.on("messageCreate", msg => { } }) -//const modules = ["nsfw", "random"] -const modules = ["basic", "bullshit", "marriage", "http", "roleplay", "death", "economy", "waifu", "operator"] +//const modules = ["random"] +const modules = ["basic", "bullshit", "marriage", "http", "roleplay", "death", "economy", "waifu", "operator", "nsfw"] for (let f of modules) { let m = require(`./${f}.js`) @@ -1,35 +1,36 @@ -local http, env, storage -local C = minetest.get_color_escape_sequence - -function furrybot.get_ascii_genitals(name, begin, middle, ending, seed) - return begin .. furrybot.repeat_string(middle, furrybot.strrandom(name, seed, 2, 10)) .. ending -end - -function furrybot.get_ascii_dick(name) - return minetest.rainbow(furrybot.get_ascii_genitals(name, "8", "=", "D", 31242)) -end - -function furrybot.get_ascii_boobs(name) - return furrybot.get_ascii_genitals(name, "E", "Ξ", "3", 31243) -end - -furrybot.commands.dicksize = { - params = "[<player>]", - help = "Display the size of your own or another player's dick", - func = function(name, target) - target = target or name - furrybot.send(furrybot.get_ascii_dick(target) .. furrybot.colors.system .. " ← " .. furrybot.ping(target, furrybot.colors.system) .. "'s Dick", furrybot.colors.system) - end, +const pseudoRandom = require("pseudo-random") +const common = require("./common.js") + +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") +const asciiBoob = id => asciiGenital(id + 2, "E", "Ξ", "3") + +module.exports = { + dicksize: { + params: "[<player>]", + help: "Display the size of your own or another users's dick", + func: (msg, [targetPing]) => { + const target = targetPing ? common.getPing(targetPing) : msg.author.id + + if (target) + msg.reply(`${asciiDick(target)} ← <@!${targe}>'s Dick'`) + } + }, + boobsize: { + params: "[<player>]", + help: "Display the size of your own or another users's boobs", + func: (msg, [targetPing]) => { + const target = targetPing ? common.getPing(targetPing) : msg.author.id + + if (target) + msg.reply(`${asciiBoob(target)} ← <@!${targe}>'s Boobs'`) + } + }, } -furrybot.commands.boobsize = { - params = "[<player>]", - help = "Display the size of your own or another player's boobs", - func = function(name, target) - target = target or name - furrybot.send(furrybot.get_ascii_boobs(target) .. furrybot.colors.system .. " ← " .. furrybot.ping(target, furrybot.colors.system) .. "'s Boobs", furrybot.colors.system) - end, -} +/* 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) @@ -55,7 +56,4 @@ furrybot.commands.cum = { furrybot.send(name .. " is cumming: " .. furrybot.get_ascii_dick(name) .. C("#FFFFFF") .. furrybot.repeat_string("~", math.random(1, 10)), furrybot.colors.roleplay) end } - -return function(_http, _env, _storage) - http, env, storage = _http, _env, _storage -end +*/ |