Fix current/total - v2

This commit is contained in:
Pedro de Oliveira 2020-02-19 23:16:22 +00:00
parent 42bc7d0085
commit dd2e6382d4
1 changed files with 5 additions and 0 deletions

View File

@ -85,6 +85,8 @@ class Metal(callbacks.Plugin):
)
result = json.loads(response.content.decode('utf-8'))
if position < 1:
position = 1
position = position - 1
total = result['iTotalRecords']
@ -98,6 +100,9 @@ class Metal(callbacks.Plugin):
irc.error('NO HACKZ', prefixNick=False)
return
if total > 200:
total = "200+"
irc.reply(self.__format_message(item, position + 1, total), prefixNick=False)
find = wrap(find, ['anything', optional('int', default=1)])