-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul scorebot; support editing messages in the webhook service; m… #946
Conversation
…iscellaneous typing updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Comments are just reminders to add some notes to the release notes of the next release to ensure people take over necessary changes to their files they might have copied.
command=python -m rcon.scorebot | ||
environment=LOGGING_FILENAME=scorebot_%(ENV_SERVER_NUMBER)s.log | ||
startretries=24 | ||
[program:scoreboard] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When doing a release, this should be explicitly mentioned. Some people (including me) have their "own" supervisord.conf, where they need to make these changes well
@@ -63,6 +66,7 @@ x-supervisor: &supervisor | |||
- ./logs:/logs/ | |||
- ./supervisor_data:/data | |||
- ./config:/config/ | |||
- scoreboard_db:/scoreboard_db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another thing that needs to be documented, people are supposed to copy-paste this file iirc.
@@ -122,6 +122,27 @@ class Faction(pydantic.BaseModel): | |||
name: str | |||
team: Team | |||
|
|||
if TYPE_CHECKING: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, I didn't know about that :)
entrypoint.sh
to port legacy scorebot public stat URL/webhook URLs, we can remove this in a few releasesget_scorebot_config
is still available as an endpoint so people can easily get their old settingsrcon.scoreboard.py
torcon.player_stats.py
to be more clear (and I wanted to use thescoreboard
namescoreboard
to differentiate/make troubleshooting easier when supporting usersSo legacy scorebot used a single message and didn't contain a map rotation.
This splits the message into three sections, the header/game state, map rotation and player stats to help get around inherent Discord API limitations on message length/etc. This allows people to show off more player stats if they prefer.
It's very customizable; people can turn off individual sections/translate text for the different sections.
It also now works internally with an RCON instance instead of making requests through the docker network; the only mandatory settings are a public stats port, and at least one webhook URL which should be easier for users to configure.
I tested this locally and it seems to work just fine.