diff --git a/post-poll.py b/post-poll.py index 8a5bc98..ad40fd4 100644 --- a/post-poll.py +++ b/post-poll.py @@ -43,6 +43,8 @@ if len(rows) < 2: exit(0) def media(name, emoji): + if emoji is None: + return {'text': name} emoji_obj = {'id': emoji} if emoji.isascii() and emoji.isdigit() else {'name': emoji} return {'text': name, 'emoji': emoji_obj}