Dev
Bots

Bots

Some info on botmaking and stuff.

Let's make a (very simple) Mastodon bot

What do we need?

  1. A Masdodon account https://bne.social/auth/sign_up (opens in a new tab)
  2. A Deno Deploy account https://dash.deno.com/new (opens in a new tab)
  3. Create a Mastodon "App" in Settings https://bne.social/settings/applications (opens in a new tab)
  4. Grab your App access token
  5. 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:

  1. A web pinging service https://uptimerobot.com (opens in a new tab)
  2. 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.

  1. ReplyGPT - https://mas.to/@replyGPT (opens in a new tab)
  2. Riker Googling - https://botsin.space/@RikerGoogling (opens in a new tab)
  3. Picard Tips - https://botsin.space/@picardtips (opens in a new tab)
  4. Elon Musk's Jet - https://mastodon.social/@elonjet (opens in a new tab)
  5. Endless Scream - https://botsin.space/@scream (opens in a new tab)