Attempting to invoke subcommands, without invoking master command
This commit is contained in:
parent
471a5d1ec6
commit
85a51855e4
|
@ -8,7 +8,7 @@ class Twitch:
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
@commands.group(pass_context=True,no_pm=True)
|
@commands.group(pass_context=True,no_pm=True,invoke_without_command=True)
|
||||||
async def twitch(self, ctx, *, member : discord.Member = None):
|
async def twitch(self, ctx, *, member : discord.Member = None):
|
||||||
pass
|
pass
|
||||||
if member is not None:
|
if member is not None:
|
||||||
|
@ -20,7 +20,7 @@ class Twitch:
|
||||||
await self.bot.say("{}'s twitch URL is {}'".format(member.name,result['twitch_url']))
|
await self.bot.say("{}'s twitch URL is {}'".format(member.name,result['twitch_url']))
|
||||||
config.closeConnection()
|
config.closeConnection()
|
||||||
else:
|
else:
|
||||||
await self.bot.say("{} has not savede their twitch URL yet!")
|
await self.bot.say("{} has not savede their twitch URL yet!".format(member.name))
|
||||||
config.closeConnection()
|
config.closeConnection()
|
||||||
|
|
||||||
@twitch.command(name='add',pass_context=True,no_pm=True)
|
@twitch.command(name='add',pass_context=True,no_pm=True)
|
||||||
|
|
Loading…
Reference in a new issue