plerobuddies/src/chat.js

23 lines
492 B
JavaScript
Raw Normal View History

2021-03-29 21:43:10 +02:00
// the main juice
const { buddies } = require('./config')
if(!buddies) throw "Did you seutp your config?"
const { toot } = require('./toot');
(async function() {
for await(buddy of buddies) {
const { chat } = require(`./buddies/${buddy}/buddy`)
// contains 'toot', and maybe 'attach' / 'attachDescription'
const message = await chat()
console.log(`buddy ${buddy} has this to say: ${JSON.stringify(message)}`)
await toot(message)
}
console.log('Done! for now... ')
})()
2021-03-29 21:43:10 +02:00