fix another silly mistake in post-poll.py for entries without emoji
This commit is contained in:
parent
9942640e24
commit
1b9499b404
1 changed files with 2 additions and 0 deletions
|
@ -43,6 +43,8 @@ if len(rows) < 2:
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
def media(name, emoji):
|
def media(name, emoji):
|
||||||
|
if emoji is None:
|
||||||
|
return {'text': name}
|
||||||
emoji_obj = {'id': emoji} if emoji.isascii() and emoji.isdigit() else {'name': emoji}
|
emoji_obj = {'id': emoji} if emoji.isascii() and emoji.isdigit() else {'name': emoji}
|
||||||
return {'text': name, 'emoji': emoji_obj}
|
return {'text': name, 'emoji': emoji_obj}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue