You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
546 B
28 lines
546 B
import * as dotenv from 'dotenv';
|
|
dotenv.config();
|
|
|
|
import pkg from 'express';
|
|
const { Express } = pkg;
|
|
|
|
import { login } from 'masto';
|
|
|
|
const masto = await login({
|
|
url: process.env.URL,
|
|
accessToken: process.env.ACCESS_TOKEN,
|
|
});
|
|
|
|
console.log("selfcarebot starting...");
|
|
|
|
const M = await masto.v1.statuses.create ({
|
|
status: 'Testing; coming soon! 🌸',
|
|
visibility: 'public',
|
|
});
|
|
|
|
M.post('statuses', params, (error, data) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log(data);
|
|
}
|
|
}
|
|
); |