1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-24 22:27:28 +00:00

WIP Add guild.id resolution to guild.name for guild info command

This commit is contained in:
Myned 2019-01-03 18:05:36 -05:00
parent 41daa41c78
commit 031f316866

View file

@ -22,15 +22,20 @@ class Info:
# #
# await ctx.send(embed=embed) # await ctx.send(embed=embed)
@cmds.group(name='info', aliases=['i']) @cmds.group(name='info', aliases=['i'], hidden=True)
async def info(self, ctx): async def info(self, ctx):
if ctx.invoked_subcommand is None: if ctx.invoked_subcommand is None:
await ctx.send('<embed>BOT INFO</embed>') await ctx.send('<embed>BOT INFO</embed>')
@info.command(aliases=['g', 'server', 's'], brief='Provides info about a guild', hidden=True) @info.command(aliases=['g'], brief='Provides info about a guild')
async def guild(self, ctx): async def guild(self, ctx, guild_id: int):
pass guild = d.utils.get(self.bot.guilds, id=guild_id)
@info.command(aliases=['u', 'member', 'm'], brief='Provides info about a user', hidden=True) if guild:
async def user(self, ctx): await ctx.send(guild.name)
else:
await ctx.send(f'**Not in any guilds by the id of: ** `{guild_id}`')
@info.command(aliases=['u'], brief='Provides info about a user')
async def user(self, ctx, user: d.User):
pass pass