MatrikMoon / TournamentAssistant

A program designed to make it easier to coordinate tournaments for the VR rhythm game Beat Saber
MIT License
39 stars 26 forks source link

Bot leaderboard failing to edit/update #68

Closed 16ajans closed 1 year ago

16ajans commented 1 year ago

Bot sends the leaderboard correctly once, but refuses to update it while correctly logging newly received scores to the channel.

image

Note the non-inclusion of the new scores in the leaderboard message.

Logged:

Mar 08 18:47:16 cvre01 TournamentAssistantCore[499911]: Object reference not set to an instance of an object.
Mar 08 18:47:16 cvre01 TournamentAssistantCore[499911]:    at TournamentAssistantCore.Discord.QualifierBot.SendLeaderboardUpdate(UInt64 channelId, UInt64 messageId, List`1 scores, List`1 maps)
Mar 08 18:47:16 cvre01 TournamentAssistantCore[499911]:    at TournamentAssistantCore.SystemServer.Server_PacketReceived(ConnectedUser user, Packet packet)
Mar 08 18:47:16 cvre01 TournamentAssistantCore[499911]:    at TournamentAssistantCore.Sockets.Server.ReceiveLoop(ConnectedUser player)
MatrikMoon commented 1 year ago

Thanks for logging the issue! The bot might not stick around for too much longer, but it'd be nice to have it working while it's here. This is a feature I've "fixed" countless times, and yet it always seems to get angry for one reason or another... If you're willing to test with me though, I'd be glad to give it another touchup ❤️

MatrikMoon commented 1 year ago

To the others who might read this: we did some testing, and came to the conclusion that the bot needs the Message Content privileged intent to edit the old message. Not much I can do about that from my side except maybe handle the error better, but for now, I'm going to close this since the bot is probably going away soon 🖖