2017-09-24 11:05:28 -04:00
|
|
|
import asyncio
|
2017-10-12 22:26:22 -04:00
|
|
|
import traceback as tb
|
|
|
|
|
2017-10-15 01:34:52 -04:00
|
|
|
import discord as d
|
2017-11-20 06:18:42 -05:00
|
|
|
from discord.ext import commands as cmds
|
2017-10-12 22:26:22 -04:00
|
|
|
|
2017-09-24 11:05:28 -04:00
|
|
|
from misc import exceptions as exc
|
2017-10-15 01:34:52 -04:00
|
|
|
from utils import utils as u
|
2017-09-24 11:05:28 -04:00
|
|
|
|
|
|
|
|
|
|
|
class Info:
|
|
|
|
|
2017-10-20 16:15:18 -04:00
|
|
|
def __init__(self, bot):
|
|
|
|
self.bot = bot
|
|
|
|
|
2017-11-20 06:18:42 -05:00
|
|
|
# @cmds.command(name='helptest', aliases=['h'], hidden=True)
|
2017-10-20 16:15:18 -04:00
|
|
|
# async def list_commands(self, ctx):
|
|
|
|
# embed = d.Embed(title='All possible commands:', color=ctx.me.color)
|
|
|
|
# embed.set_author(name=ctx.me.display_name, icon_url=ctx.me.avatar_url)
|
|
|
|
# embed.add_field(
|
|
|
|
# name='Booru', value='\n{}bl umbrella command for managing blacklists'.format(u.config['prefix']))
|
|
|
|
#
|
|
|
|
# await ctx.send(embed=embed)
|
|
|
|
|
2019-01-03 18:05:36 -05:00
|
|
|
@cmds.group(name='info', aliases=['i'], hidden=True)
|
2017-10-20 16:15:18 -04:00
|
|
|
async def info(self, ctx):
|
2018-11-06 23:55:51 -05:00
|
|
|
if ctx.invoked_subcommand is None:
|
2017-10-20 16:15:18 -04:00
|
|
|
await ctx.send('<embed>BOT INFO</embed>')
|
|
|
|
|
2019-01-03 18:05:36 -05:00
|
|
|
@info.command(aliases=['g'], brief='Provides info about a guild')
|
|
|
|
async def guild(self, ctx, guild_id: int):
|
|
|
|
guild = d.utils.get(self.bot.guilds, id=guild_id)
|
|
|
|
|
|
|
|
if guild:
|
|
|
|
await ctx.send(guild.name)
|
|
|
|
else:
|
|
|
|
await ctx.send(f'**Not in any guilds by the id of: ** `{guild_id}`')
|
2017-10-20 16:15:18 -04:00
|
|
|
|
2019-01-03 18:05:36 -05:00
|
|
|
@info.command(aliases=['u'], brief='Provides info about a user')
|
|
|
|
async def user(self, ctx, user: d.User):
|
2017-10-20 16:15:18 -04:00
|
|
|
pass
|