diff --git a/main.py b/main.py index 7b51d51..3d491a0 100644 --- a/main.py +++ b/main.py @@ -132,7 +132,14 @@ async def list_tags(msg: Message): tags.sort() lines = [] for tag in tags: - lines.append(f'- {tag} [/del_{tag}]') + entry = f'- {tag} [/del_{tag}]' + if len('\n'.join(lines + [entry])) > 4096: + lines = "\n".join(lines) + await msg.reply(f'Monitored tags:\n\n{lines}') + lines = [entry] + else: + lines.append(f'- {tag} [/del_{tag}]') + lines = "\n".join(lines) await msg.reply(f'Monitored tags:\n\n{lines}')