fixing issue where trying to fetch a breed before breeds list loaded resulted in trying to fetch sub-breeds and then error

This commit is contained in:
Adam Piontek 2018-08-26 10:41:09 -04:00
parent 755ddc2f36
commit 43f539bdd3

View file

@ -32,6 +32,7 @@ class Doggo(BotPlugin):
# But what if user passed us a sub-breed?
if len(args) > 1 and args[1]:
subbreed = args[1]
if subbreed != 'calledbyfunction':
if len(self.breeds[breed]) == 0:
if 'calledbyfunction' not in args:
args.append('calledbyfunction')