Skip to content

Commit

Permalink
Merge pull request #66 from sopel-irc/additional-tweet-errors
Browse files Browse the repository at this point in the history
Handle additional exception types potentially raised for tweets
  • Loading branch information
dgw authored May 23, 2024
2 parents 181797e + c069df9 commit 7f33c3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sopel_twitter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ def output_status(bot, trigger, id_):
except tweety_errors.AuthenticationRequired:
bot.say("That content requires authentication; sorry!")
return
except tweety_errors.UserProtected:
bot.say("User profile is protected.")
return
except tweety_errors.ProtectedTweet:
bot.say("Tweet is protected.")
return
except tweety_errors.RateLimitReached:
bot.say("Rate limit reached. Please try again later.")
return
Expand Down

0 comments on commit 7f33c3e

Please sign in to comment.