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,138
First release
Last update
User rating
0.00 star(s) 0 ratings

To join the OverTake Racing Club races I want them to be: (multiple choice)

  • Free to access

    Votes: 27 84.4%
  • Better structured events

    Votes: 7 21.9%
  • Better structured racing club forum

    Votes: 5 15.6%
  • More use of default game content

    Votes: 3 9.4%
  • More use of fixed setups

    Votes: 10 31.3%
  • No 3rd party registration pages

    Votes: 9 28.1%
  • Less casual events

    Votes: 5 15.6%
  • More casual events

    Votes: 10 31.3%
  • Other, specify in thread

    Votes: 1 3.1%
Back
Top