1
0
Fork 0
mirror of synced 2024-06-02 18:54:33 +12:00

Attempting to invoke subcommands, without invoking master command

This commit is contained in:
Phxntxm 2016-07-10 10:33:54 -05:00
parent 471a5d1ec6
commit 85a51855e4

View file

@ -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)