Open unixfox opened 5 years ago
Does PGM change server properties at match end? If so, mineflayer's GAME event might work. Alternatively, you could listen for the game end sound effect via the SOUNDEFFECTHEARD event.
Mmh good ideas right there but the issue tho is that I've to know the name of the team or the player that won but it's actually good ideas because I could combine that way to detect the end of the match with a simpler regex that parse the chat to fetch the name of the team or the player! Anyway thanks for your contribution, I'll try to check what's the best way for implementation.
Currently the portion of code that detect the end of the match is an ugly long regex: https://github.com/unixfox/grafana-stratusnetwork/blob/master/bot.js#L197 I need to find a better way to detect that end of the match. Currently the regex doesn't detect
Blue Team wins!
Shouldn't trigger on everything that have
wins!
before like this: https://i.imgur.com/wKNvq3Z.png