barf's Discord server bridge

barf's Discord server bridge 1.2.1

Login or Register an account to download this content
Discord-Logo+Wordmark-Color.png

This is a simple Python script I made which wraps around the Assetto Corsa server executable to parse the stdout and send Discord notifications using WebHooks. It passes stdout through and so should hopefully work OK with things like sTracker and AC server manager etc.

It requires a Steam API key (if logging server pings), Python 3 and the requests module. I haven't tried it on Windows, but I think it should work. Try 'pip3 install requests' on Windows or 'apt-get install python3-requests' on Ubuntu/Debian.

ac-bridge-pic3-png.318455

ac-bridge-pic1-png.318456

Features:
  • Send in-game chat messages to a Discord channel
  • Send driver join/leave notifications to a Discord channel
  • Log server pings to Discord and show Steam user info
Installation / Usage:
  1. You will need a Steam API key (if logging server pings), and Discord WebHook URL(s).
  2. Extract ac_discord_bridge.py to the main Assetto Corsa directory.
  3. Open the script in a text editor, and paste your Steam API key into the line where it says:
    Code:
    steam_api_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    Put your Discord WebHook URLs into the lines:
    Code:
    log_webhook_url = 'https://discordapp.com/api/webhooks/foo/bar'
    and:
    Code:
    chat_webhook_url = 'https://discordapp.com/api/webhooks/foo/bar'
    The chat and log messages can be separated, or just use the same WebHook URL to put them all into the same channel.
  4. Save your edits and run ac_discord_bridge.py instead of acServer :)
The ping notifications can get a bit out of control and so are disabled by default. If you want to enable them, change:
Code:
POLL_MESSAGES = False
to:
Code:
POLL_MESSAGES = True

This is free software. Any support is appreciated!
btn_donateCC_LG.gif
  • ac-bridge-pic3.png
    ac-bridge-pic3.png
    39 KB · Views: 2,116
  • ac-bridge-pic1.png
    ac-bridge-pic1.png
    169.3 KB · Views: 1,495
  • ac-bridge-pic2.png
    ac-bridge-pic2.png
    173.5 KB · Views: 329
  • Discord-Logo-Color.png
    Discord-Logo-Color.png
    1.5 KB · Views: 300

Latest updates

  1. steam user lookup off by default

    steam user lookup off by default now
  2. tidy up

    tidied up some code, believe it or not
  3. fixed parsing error

    fixed a parsing error and should work on Windows now I think

Latest News

Author
barf
Downloads
75
File size
1.9 KB
Views
4,119
First release
Last update
User rating
0.00 star(s) 0 ratings

What would make you race in our Club events

  • Special events

    Votes: 62 29.4%
  • More leagues

    Votes: 41 19.4%
  • Prizes

    Votes: 43 20.4%
  • Trophies

    Votes: 24 11.4%
  • Forum trophies

    Votes: 14 6.6%
  • Livestreams

    Votes: 32 15.2%
  • Easier access

    Votes: 116 55.0%
  • Other? post your reason

    Votes: 35 16.6%
Back
Top