-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
executable file
·37 lines (26 loc) · 848 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//developer ackroydAI
//for joanna
require('dotenv').config();
const systemsleep = require('systemsleep');
const Snoowrap = require('snoowrap');
const Snoostorm = require('snoostorm');
const r = new Snoowrap({
userAgent: 'redditsimplebot',
clientId: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET,
username: process.env.REDDIT_USER,
password: process.env.REDDIT_PASS
});
const client = new Snoostorm(r);
const streamOpts = {
subreddit: 'testingground4bots',
results: 5
};
const comments = client.CommentStream(streamOpts);
var sleep = require('systemsleep');
sleep(630*1);
comments.on('comment', (comment) => {
if (comment.body.includes('test')){
comment.reply('try joanna-bot so i can develop her to try and win the Loebner prize in 2020 - thankyou - be kind https://joannabot.ejemplo.me');
}
});