diff --git a/mumbleBot.py b/mumbleBot.py index 4e2dd6c..9d19548 100644 --- a/mumbleBot.py +++ b/mumbleBot.py @@ -388,7 +388,10 @@ class MumbleBot: homepage = s['homepage'] msg += f'{stationid}{stationname}{genre}{codec}/{bitrate}{country}{homepage}/' msg += '' - self.send_msg(msg, text) + if len(msg) < 5000: + self.send_msg(msg, text) + else: + self.send_msg('Query result too long to post (> 5000 characters), please try another query.', text) # Play a secific station (by id) from http://www.radio-browser.info API elif command == var.config.get('command', 'rb_play'): logging.debug('Play a station by ID')