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:
parent
755ddc2f36
commit
43f539bdd3
1 changed files with 10 additions and 9 deletions
1
doggo.py
1
doggo.py
|
@ -32,6 +32,7 @@ class Doggo(BotPlugin):
|
||||||
# But what if user passed us a sub-breed?
|
# But what if user passed us a sub-breed?
|
||||||
if len(args) > 1 and args[1]:
|
if len(args) > 1 and args[1]:
|
||||||
subbreed = args[1]
|
subbreed = args[1]
|
||||||
|
if subbreed != 'calledbyfunction':
|
||||||
if len(self.breeds[breed]) == 0:
|
if len(self.breeds[breed]) == 0:
|
||||||
if 'calledbyfunction' not in args:
|
if 'calledbyfunction' not in args:
|
||||||
args.append('calledbyfunction')
|
args.append('calledbyfunction')
|
||||||
|
|
Loading…
Reference in a new issue