BafDyce / botamusique

Bot to play local music on Mumble (using pymumble). youtube;soundcloud,radio soon.
MIT License
1 stars 0 forks source link

Bot sends no mumble reply if text message is too long. #43

Open BafDyce opened 6 years ago

BafDyce commented 6 years ago

E.g. running !list with a huge list of files in the music directory leads to a long reply message. Depending on the mumble server's settings this message might be rejected by the server.

The bot should be able to determine whether a given message was successfully sent (or determine the maximimum message length in characters). Then the message should be either truncated, split into multiple messages, or it should just send an error message.

BafDyce commented 6 years ago

I am already working on a fix for this. However, there are some complications:

  1. The current version of pymumble does not return an error if a message was too long to send. I've modified it locally, however I'd like to merge these changes upstream before pushing the fix on the bot-side.

  2. Apparently, the official Mumble (Desktop) clients handle long messages differently (on different platforms/versions), so even if the bot respects the mumble servers' message length limit, there's no guarantee that all clients are able to receive the messages.

azlux commented 6 years ago

The important part is the server. If the client don't support it, you will have a message that the text is too long.

BafDyce commented 6 years ago

Yeah, I know. I'm already working on the client side of this feature.