diff --git a/reddit.py b/reddit.py index 8bd76b5..a4acff8 100644 --- a/reddit.py +++ b/reddit.py @@ -75,4 +75,10 @@ def reddit_img(bot, update, args): update.message.reply_text("Geile, sag sub") return sub = args[0] - bot.send_photo(chat_id=update.message.chat_id, photo=get_reddit_post(sub, True)) + post = get_reddit_post(sub, True) + + try: + bot.send_photo(chat_id=update.message.chat_id, photo=post.url) + return + except AttributeError: + update.message.reply_text(post)