improve name formatting
This commit is contained in:
parent
fd19140379
commit
59d11fcb82
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ from telegram.ext import Updater, CommandHandler, PicklePersistence
|
||||||
|
|
||||||
|
|
||||||
class DudleBot:
|
class DudleBot:
|
||||||
LINE_LIMIT = 9
|
LINE_LIMIT = 8
|
||||||
|
|
||||||
def __init__(self, token):
|
def __init__(self, token):
|
||||||
self.logger = logging.getLogger("dudle")
|
self.logger = logging.getLogger("dudle")
|
||||||
|
@ -139,8 +139,8 @@ class DudleBot:
|
||||||
for response in responses:
|
for response in responses:
|
||||||
formatted_plan += f"{str(response)} "
|
formatted_plan += f"{str(response)} "
|
||||||
|
|
||||||
formatted_plan += entry.name if len(entry.name) < self.LINE_LIMIT \
|
formatted_plan += entry.name if len(entry.name) <= self.LINE_LIMIT \
|
||||||
else entry.name[:self.LINE_LIMIT - 2] + "…"
|
else entry.name[:self.LINE_LIMIT - 1].strip() + "…"
|
||||||
formatted_plan += "\n"
|
formatted_plan += "\n"
|
||||||
|
|
||||||
formatted_plan += "```"
|
formatted_plan += "```"
|
||||||
|
|
Loading…
Reference in a new issue