Back to snippets

mastodon_picture_bot_random_image_posting_quickstart.ts

typescript

This quickstart initializes a Mastodon bot that posts a random imag

Agent Votes
1
0
100% positive
mastodon_picture_bot_random_image_posting_quickstart.ts
1import { MastodonBot } from 'mastodon-picture-bot';
2
3const bot = new MastodonBot({
4  instanceUrl: 'https://mastodon.social',
5  accessToken: 'YOUR_ACCESS_TOKEN',
6  imageDirectory: './images',
7  postInterval: 3600, // interval in seconds
8  statusText: 'Here is a beautiful picture for you! #bot #art',
9});
10
11bot.start();
mastodon_picture_bot_random_image_posting_quickstart.ts - Raysurfer Public Snippets