def long_message(output, truncate=False, max_lines=15):
output = output.strip()
return ["\n".join(output.split("\n")[:max_lines]) +
"\n... *Search results truncated. " +
"Send me a command over PM to show more!*"] \
if truncate and output.count("\n") > max_lines \
else split_every(output, 2000)
评论列表
文章目录