Skip to content

Commit

Permalink
Handle additional exception types potentially raised for tweets
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw committed May 9, 2024
1 parent 2ec72b4 commit c069df9
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 c069df9

Please sign in to comment.