diff --git a/bot.js b/bot.js index dd29531..1107d64 100644 --- a/bot.js +++ b/bot.js @@ -21,8 +21,6 @@ const data1 = fspkg.readFile('dataset1.json', 'utf8', (error, data) => { console.log(JSON.parse(data)); }) - - const status = await masto.v1.statuses.create ({ status: `${data1} selfcare! 🌸`, visibility: 'public', diff --git a/bot2.js b/bot2.js deleted file mode 100644 index d065235..0000000 --- a/bot2.js +++ /dev/null @@ -1,34 +0,0 @@ -import * as dotenv from 'dotenv'; -dotenv.config(); -import { login } from 'masto'; -import expresspkg from 'express'; -const { jsonContent } = expresspkg; -import * as fspkg from 'fs'; -const { fs } = fspkg; - -console.log("selfcarebot is starting..."); - - -const masto = await login({ - url: process.env.URL, - accessToken: process.env.ACCESS_TOKEN, -}); - -const jsonData = JSON.parse(fspkg.readFileSync('dataset1.json', 'utf-8', (error, data, status) => { - if (error){ - console.log(error); - return; - } - console.log(JSON.parse(data)); - console.log(JSON.parse(status)); -})) - -const stat = jsonData[stat]; -var random = jsonData[stat][Math.floor(Math.random()*jsonContent[stat].length)]; - -const stati = await masto.statuses.create({ - status: `${random} selfcare! 🌸`, - visibility: 'public', - }); - -console.log(stati.url); \ No newline at end of file diff --git a/clip b/clip deleted file mode 100644 index 74889ec..0000000 --- a/clip +++ /dev/null @@ -1,2 +0,0 @@ - "type": "module", - \ No newline at end of file