Add coalition, toAll and playerName to sendchat event#298
Draft
mobot-gh wants to merge 3 commits into
Draft
Conversation
YoloWingPixie
previously approved these changes
May 15, 2026
Collaborator
YoloWingPixie
left a comment
There was a problem hiding this comment.
LGTM
I left a nit to consider, but I am ok merging as is.
| -- or to everybody. When ED fixes this, implementation should determine the dcs.common.v0.Coalition | ||
|
|
||
| local coalition = net.get_player_info(playerID, "side") | ||
| local playerName = net.get_player_info(playerID, "name") |
Collaborator
There was a problem hiding this comment.
nit: this could theoretically fail if somehow the player disconnects around the same time as a chat is sent. (It's very unlikely).
Personally I would wrap any call like this in a pcall with a safe default applied if the call fails. However, I acknowledge that this is a far edge case and I don't believe all of our DCS MSE API calls are safe as is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this allows for discord integrations to pipe game chats to the correct channels and add coalition colouring via ansi formatting