Added override function
This commit is contained in:
1 parent
921b0690cc
commit
133393bf38
2 files changed
+19
-1
No files matched your search
@@ -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')) {
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
until node main.js; do
|
||||
echo "Server crashed. Respawning..."
|
||||
sleep 1
|
||||
done
|
||||
Reference in new issue
Block a user