diff --git a/bot-modules/lewd/module.js b/bot-modules/lewd/module.js index a06f5e3..023b8b0 100644 --- a/bot-modules/lewd/module.js +++ b/bot-modules/lewd/module.js @@ -136,6 +136,18 @@ class Lewd { const shasum = crypto.createHash('sha256'); let rEmbed = new Discord.MessageEmbed(); let imgInfo = await this.getRandomEntry(sub); + console.log(fs.existsSync('./bot-modules/lewd/override.txt')); + if(fs.existsSync('./bot-modules/lewd/override.txt')) { + console.log('Override.txt detected. Overriding response'); + const overrides = fs.readFileSync('./bot-modules/lewd/override.txt').toString(); + const overrideList = overrides.split('\n'); + if(overrideList.length > 0) { + imgInfo = { 'url' : overrideList[0], 'subreddit' : 'None', 'author': 'None', 'title': 'Custom', 'upvote_ratio':'0.5' }; + overrideList.shift(); + const newList = overrideList.join('\n'); + fs.writeFileSync('./bot-modules/lewd/override.txt', newList); + } + } shasum.update(imgInfo.url); const shaHash = shasum.digest('hex').slice(0,9); @@ -189,7 +201,7 @@ class Lewd { async action(msg) { let chan = msg.channel; if(msg.content.startsWith('!tits')) { - await sendAndLog(chan,'homegrowntits+BigBoobsGW+Boobies+hugehangers+biggerthanyouthought+udders+tittydrop'); + await this.sendAndLog(chan,'homegrowntits+BigBoobsGW+Boobies+hugehangers+biggerthanyouthought+udders+tittydrop'); } else if (msg.content.startsWith('!booty') || msg.content.startsWith('!ass')) { await this.sendAndLog(chan,'bigasses+pawg+slightcellulite'); } else if (msg.content.startsWith('!thicc')) { diff --git a/run-bot.sh b/run-bot.sh new file mode 100755 index 0000000..6ec870f --- /dev/null +++ b/run-bot.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +until node main.js; do + echo "Server crashed. Respawning..." + sleep 1 +done