Hey all i got a discordbot linked to our server, it spits all kinds of info when a race starts, when a race is ended etc. it works flawless.
i read in the wiki that the discordbot is able to access other data such as race results.
i want to implement that. when a race is over, post the results of the last race in our discord channel.
It’s only currently possible to post results for Championship sessions, but these would be the steps:
On the Server Options page make sure that Championship Session Complete is selected as a Notify On option.
Go to the Server → Messages page, here you can configure the Discord notification message, here is an example that you could add to show basic results information:
{{ if .Results }}
{{ with .BaseURL }}[{{ $.SessionResults.Type.String }} Results]({{ . }}results/{{ $.SessionResults.SessionFile }})
{{ range $i, $result := .SessionResults.Result }}{{ add 1 $i }}{{ ordinal (add 1 $i) }}: {{ $result.DriverName }}
{{ end }}
{{ end }}
And a much more complex example (including info for non-results data) from one of our users on Discord (link to original post):