Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Fruit Machine Mastodon Bot

Source code for the very silly bot deployed at

This codebase includes the Mastodon client and "Fruit Machine" image generator for the aforementioned bot.


As configured, the fruit machine symbols are set to use the fabulous Mutant Standard, an alternative emoji set with great principles, and a highly readable and all around lovely design language.

If you like what you see, please support their work through donations or get yourself good merch from them.

Check the official website for the license of the emoji.

Mastodon Client

The Mastodon client is built for the purpose of this bot, using (PyPI).



  • Python 3.6.


The bot's behaviour can be configured through data/resources.json.


Local usage

First you need to populate the resources/emoji/ directory with a structure of images as generated by orxporter. Check the directory's README for more details.

Then to generate a Fruit Machine locally:

$ ./bin/fruitmachine -o <path_for_image>

The standard output will show a status and image description.

Posting to Mastodon

To post to Mastodon, you need to set up the client by one of two ways:

  1. Set the FRUITMACHINE_CLIENT_ID, FRUITMACHINE_CLIENT_SECRET and FRUITMACHINE_ACCESS_TOKEN environment variables with the values given on the Settings > Development > Your application interface of your Mastodon instance;
  2. Create two text files, data/client_cred.secret and data/user_cred.secret. The first file should have the "Client ID" in the first line, and the "Client Secret" in second line; the second file needs to have the "Access Token" in the first line.

Then just use:

$ ./bin/fruitmachine

and a fruit machine will be posted to the account. You can use the -D switch to print "debug" data, and the post's visibility will be set to direct, i.e., only the account posting will be able to see it.


The code is licensed under an ISC license. Check LICENSE for details.

Check Mutant Standard's homepage for the emoji's license.

The Fruit Machine graphics are licensed under a Creative Commons LicenseCreative Commons Attribution 4.0 International License.


Source code for a silly Mastodon bot:




No releases published


No packages published