From 141653d4665393c07e6390d6d86809cb61a59d3f Mon Sep 17 00:00:00 2001 From: Dalton Date: Fri, 7 Dec 2018 20:08:07 -0800 Subject: [PATCH] created config starting place --- bot-config.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++ bot.js | 6 +++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 bot-config.json diff --git a/bot-config.json b/bot-config.json new file mode 100644 index 0000000..1e009ea --- /dev/null +++ b/bot-config.json @@ -0,0 +1,46 @@ +{ + "botConfig": { + "commandHelp": { + "coinflip": "**coinflip:** Returns a result of heads or tails.", + "8ball": "**8ball:** Shakes an 8 ball and returns a result.", + "roll": "**roll:** Rolls a number between 1-100 (or a specified range [ex: b.roll 50-100])", + "compute": "**compute:** Uses WolframAlpha to process the question asked.", + "summon": "[POTENTIALLY NSFW]**summon:** Posts a picture from a user inputted subreddit/imgur/redditbooru", + "bunny": "**bunny:** Posts a picture of different bunnies", + "dankmemes": "**dankmemes:** Posts a picture of some dank memes (r/dankmemes)", + "meirl": "**meirl:** Posts a picture of anime irl (r/anime_irl)", + "animemes": "**animemes:** Posts a picture of anime memes (r/animemes)", + "moe": "**moe:** Posts a picture of moe anime (r/awwnime)", + "moe-boys": "**moe-boys:** Posts a picture of moe anime boys (r/cuteanimeboys)", + "hotguys": "**hotguys:** Posts a picture of hot anime guys (r/bishounen)", + "kgirls": "**kgirls:** Posts a picture of k-pop girls (r/kpics or r/kpopfap)", + "kboys": "**kboys:** Posts a picture of k-pop guys (r/kfanservice, r/kpecs, or r/cutekboys)", + "lewd": "[NSFW] **lewd:** Posts a picture of lewd anime girls (r/pantsu)", + "ecchi": "[NSFW] **ecchi:** Posts a picture of ecchi anime girls (r/ecchi)", + "hentai": "[NSFW] **hentai:** Posts a picture of hentai (r/hentai or r/sukebei)", + "yaoi": "[NSFW] **yaoi:** Posts a picture of yaoi (r/yaoi)", + "yuru": "[NSFW] **yuri:** Post a picture of yuri (r/yuri)", + "neko": "[NSFW] **neko:** Posts a picture of cat girls (r/nekomimi)", + "pokeporn": "[NSFW] **pokeporn:** Posts a picture of pokemon hentai (r/pokeporn)", + "hgifs": "[NSFW] **hgifs:** Posts a gif of hentai (r/nsfwanimegifs)", + "hentaibondage": "[NSFW] **hentaibondage:** Posts a picture of hentai in bondage (r/hentaibondage)" + }, + "responses": { + "stupidQuestion": ["What kind of dumb question is that?", "A real question please.", + "Is that supposed to be a question?", "Who asked such a dumb question?", + "How about a good question instead?", "Only good questions please", + "Oh god, is that a question?", "Are you dumb because that is a dumb question."], + "noQuestion": ["it helps to ask a question...", "question plz.", "where is the question?"], + "eightBall": ["Maybe.", "Certainly not.", "I hope so.", "Not in your wildest dreams.", + "There is a good chance.", "Quite likely.", "I think so.", "I hope not.", + "I hope so.", "Never!", "Fuhgeddaboudit.", "Ahaha! Really?!?", "Pfft.", + "Sorry, bucko.", "Hell, yes.", "Hell to the no.", "The future is bleak.", + "The future is uncertain.", "I would rather not say.", "Who cares?", + "Possibly.", "Never, ever, ever.", "There is a small chance.", "Yes!"] + }, + "sourceMap": true + }, + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/bot.js b/bot.js index b6af2c0..7f133ef 100644 --- a/bot.js +++ b/bot.js @@ -9,7 +9,11 @@ var playVolume = []; var queueExists = false; var channel = null; +// grab config +var bot_config = asyncSiteRequest('http://127.0.0.1/folder/bot-config.json', config_data => {return config_data;}); + // available commands +// todo use config file function availableCommands() { console.log('availaleCommands called.'); return "Available commands: " + @@ -19,6 +23,7 @@ function availableCommands() { } // help commands +// todo use config file to grab botConfig.commandHelp function commandsHelp(requestedCommand) { console.log('commandsHelp called.'); let commands = { @@ -197,7 +202,6 @@ function asyncSiteRequest(url, process) { }) .catch(error => { sendToBotTestingChannel(error.message); - console.log(error.message); return ""; }) }