Return randomly selected quote with !findquote

master
Nikola Forró 7 years ago
parent f62bef8938
commit 613af58872

@ -132,8 +132,7 @@ class TwitchBot(irc.bot.SingleServerIRCBot):
try: try:
quotes = self.get(dict( quotes = self.get(dict(
filter=filter, filter=filter,
sort_by='id', sort_order='random',
sort_order='desc',
page_size=1)).json() page_size=1)).json()
quote = quotes[0] quote = quotes[0]
except (requests.exceptions.HTTPError, IndexError): except (requests.exceptions.HTTPError, IndexError):

Loading…
Cancel
Save