Bots
Some info on botmaking and stuff.
Let's make a (very simple) Mastodon bot
What do we need?
- A Masdodon account https://bne.social/auth/sign_up (opens in a new tab)
- A Deno Deploy account https://dash.deno.com/new (opens in a new tab)
- Create a Mastodon "App" in Settings https://bne.social/settings/applications (opens in a new tab)
- Grab your App access token
- Your instance's API enpoint https://bne.social/api/v1/ (opens in a new tab)
This code toots a toot:
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import Masto from "https://esm.sh/[email protected]";
serve(async () => {
const masto = new Masto({
access_token: "access_token_here",
api_url: "https://bne.social/api/v1/",
});
const response = await masto.post("statuses", {
status: "Hello this is just a test!",
visibility: "unlisted",
});
return Response.json({ message: response });
});
For automation:
- A web pinging service https://uptimerobot.com (opens in a new tab)
- Your Deno Deploy endpoint https://app-name.deno.dev (opens in a new tab)
Other bots
Below are just some interesting Mastodon bots I've found with a bit more functionality than the one we just made.
- ReplyGPT - https://mas.to/@replyGPT (opens in a new tab)
- Riker Googling - https://botsin.space/@RikerGoogling (opens in a new tab)
- Picard Tips - https://botsin.space/@picardtips (opens in a new tab)
- Elon Musk's Jet - https://mastodon.social/@elonjet (opens in a new tab)
- Endless Scream - https://botsin.space/@scream (opens in a new tab)