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,156
  • ac-bridge-pic1.png
    ac-bridge-pic1.png
    169.3 KB · Views: 1,530
  • ac-bridge-pic2.png
    ac-bridge-pic2.png
    173.5 KB · Views: 354
  • Discord-Logo-Color.png
    Discord-Logo-Color.png
    1.5 KB · Views: 320

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
81
File size
1.9 KB
Views
4,837
First release
Last update
User rating
0.00 star(s) 0 ratings

Do you prefer licensed hardware?

  • Yes for me it is vital

  • Yes, but only if it's a manufacturer I like

  • Yes, but only if the price is right

  • No, a generic wheel is fine

  • No, I would be ok with a replica


Results are only viewable after voting.
Back
Top