Fix bug when --since is missing, add more number emoji

This commit is contained in:
Midgard 2020-12-09 18:11:36 +01:00
parent a17ca67f28
commit 73ecc49d49
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -38,6 +38,7 @@ PASSWORD = os.getenv("MM_PASSWORD")
CONFIRMATION_EMOJI = True CONFIRMATION_EMOJI = True
since_arg_i = None
try: try:
since_arg_i = sys.argv.index("--since") since_arg_i = sys.argv.index("--since")
except ValueError: except ValueError:
@ -222,8 +223,11 @@ def get_posts_for_channel(mmapi, channel_id, since, **kwargs):
after = order[-1] after = order[-1]
CONFIRMATION_EMOJI_NAMES = \ CONFIRMATION_EMOJI_NAMES = [
"one,two,three,four,five,six,seven,eight,nine,keycap_ten,asterisk".split(",") *("one,two,three,four,five,six,seven,eight,nine,keycap_ten".split(",")),
*(f"num{i}" for i in range(11, 99 + 1)),
"heavy_plus_sign"
]
def confirmation_emoji_name(count): def confirmation_emoji_name(count):
if count < 0: if count < 0:
return "exclamation" return "exclamation"