Basic fediverse bot for playing blackjack with grans. Made in an attempt to learn elixir.
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.
Cassidy d8f858be90
first commit
9 months ago
PNG-cards-1.3 first commit 9 months ago
config first commit 9 months ago
lib first commit 9 months ago
priv/repo/migrations first commit 9 months ago first commit 9 months ago
last_mention_id.txt first commit 9 months ago
mix.exs first commit 9 months ago



  • figure out how to make application file and an executable that doesn't act retarded
  • add domain and access token to config to be read from there
  • stop the bot calling me a chud when process_notifications() is run at startup (add a check for replied or something)
  • add unit tests
  • delete pictures from directory after uploading them - also put them somewhere tidier
  • remove unnecessary deps from mix.exs
  • add splitting to blackjack
  • add doubling to blackjack


easiest to do via the elixir console at the moment $ iex -S mix to connect to websocket and start streaming notifications: $ BBot.SocketClient.start_link to first retrieve and process notifications since it last stopped streaming and then connect to the websocket: $ Bbot.main

database setup

create postgresql database for bot to use and then add the database name, database username and password in the config file (e.g postgres)

  1. $ BBot.Grans.reset()
  2. $ BBot.Grans.get_balance() wait until the bot has received message from the gransbot
  3. $ BBot.Grans.renew_prizepool() this will set the prizepool to be equal to the current balance donations and losses are added to the prizepool winnings are taken from the prizepool tips are held in balance and not added to the prizepool until game is finished or unless given !donate command