DonJSa library to create mastodon's bots in js
DonJS
DonJS is a javascript library to create Mastodon bots
How to start
- to start using DonJS you need to create a new folder for your bot
- then you need to run terminal or CMD in that directory
- then run
npm init -y
command. - after that you need to install the library by running
npm install donjs
to visit the documentation click here
Examples
One of the basic examples on how to use this library is
const donjs = require("donjs");
const client = new donjs("your bot token", "your mastodon instance base url");
client.sendStatus("hello world");
This example is to show, how to send hello world status using donjs. you can get the token from Settings -> Development -> create a new application then choose whatever name you want then press Submit -> copy the applications access token.
another example that explains how you can listen for the public statuses that people create or delete
const donjs = require("donjs");
const client = new donjs("your bot token", "your mastodon instance base url");
client.listenForStatuses();
client.on("onStatus", status => {
console.log("status created!");
});
client.on("onStatusDelete", id => {
console.log("status deleted!");
});
you can also listen for notifications.
const donjs = require("donjs");
const client = new donjs("your bot token", "your mastodon instance base url");
client.listenForNotifications();
client.on("onNotification", notification => {
console.log("there is a new notification!");
});
评论
mastodon-botA set of mastodon (fediverse) bots written in Go
MastodonBotBotsHaghHaghreblogscertaintootstoitselfcreatingaHaghpage.Usersfromlocalinstanceareabletom
mastodon-botA set of mastodon (fediverse) bots written in Go
0
mastodon-autofollowAutofollow bot for mastodon
Code has been removed, there is no more need for f
mastodon-autofollowAutofollow bot for mastodon
0
mastodon-autofollowAutofollow bot for mastodon
Codehasbeenremoved,thereisnomoreneedforfollowbots,justusearelaylikehttps://relay.mastodon.hostforexa
mastodon-autofollowAutofollow bot for mastodon
0
mastodon-toolsUseful tools for Mastodon users !
Mastodon.toolsℹ️ Open sourcesUseful tools for Mast
mastodon-toolsUseful tools for Mastodon users !
0
mastodon-toolsUseful tools for Mastodon users !
Mastodon.toolsℹ️OpensourcesUsefultoolsforMastodonusers!YouhaveacoolappusingMastodonAPI?Youcanhaveafr
mastodon-toolsUseful tools for Mastodon users !
0
toottoot - Mastodon CLI & TUI
Toot-aMastodonCLIclientTootisaCLIandTUItoolforinteractingwithMastodoninstancesfromthecommandline.Res
toottoot - Mastodon CLI & TUI
0
tootgroup.pyEmulate group accounts on Mastodon and Pleroma
tootgroup.py - emulate group accounts on Mastodon
tootgroup.pyEmulate group accounts on Mastodon and Pleroma
0