A small selection of Mastodon-Bots
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
607 B

from mastodon import Mastodon
import urllib.request
import os
import ssl
mastodon = Mastodon(
access_token = 'whatthecommit.secret', # File for "Your access token", can be created unter "Settings" -> "Development" -> "Your applications"
api_base_url = 'https://botsin.space' # URL that the bot is hosted on
ssl._create_default_https_context = ssl._create_unverified_context
commit = urllib.request.urlopen('http://whatthecommit.com/index.txt').read().decode('utf-8').rstrip()
mastodon.status_post("\"" + commit +"\"")