Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@commands.group(pass_context=True)
async def topmembers(self, ctx):
"""Base command for showing top members"""
if ctx.invoked_subcommand is None:
await self.bot.send_cmd_help(ctx)
@commands.group(case_insensitive=True, aliases=["hotet"])
async def et(self, ctx):
"""The event timer"""
# Help formatter preview
if ctx.invoked_subcommand is None:
msg = ("**{0}et bosses | b**: Upcoming bosses\n"
"**{0}et hot | h**: Event timer for HoT maps and Dry top\n"
"**{0}et pof | p**: Event timer for PoF and LS4 maps\n"
"**{0}et day | d** Current day/night\n\n"
"**{0}et reminder** Enable automatic reminders for events".
format(ctx.prefix))
embed = discord.Embed(title="Event Timer help",
description=msg,
color=await self.get_embed_color(ctx))
embed.set_footer(text=self.bot.user.name,
icon_url=self.bot.user.avatar_url)
info = None
@commands.group()
@commands.cooldown(1, 5, commands.BucketType.user)
async def worldcup(self, ctx):
if ctx.invoked_subcommand is None:
await arghelp.send(self.bot, ctx)
else:
pass
@commands.group(name="server", case_insensitive=True)
async def guild_manage(self, ctx):
"""Commands for server management"""
if ctx.invoked_subcommand is None:
await ctx.send_help(ctx.command)
@commands.group(pass_context=True, aliases=list(LANGUAGES['ids'].keys()))
async def run(self, ctx, *, code: Optional[str]):
"""
The main command which handles the code execution process.
"""
lang_id = LANGUAGES['ids'][str(ctx.invoked_with)]
lang = LANGUAGES['array'][lang_id]
lang.update({'id': lang_id})
print(lang, lang_id)
# lang['id'] = lang_id
await self.__execute_code(ctx, lang, code)
# if ctx.invoked_subcommand is None:
@commands.group(pass_context=True, no_pm=True)
@checks.admin_or_permissions(manage_channels=True)
async def unignore(self, ctx):
"""Removes servers/channels from ignorelist"""
if ctx.invoked_subcommand is None:
await send_cmd_help(ctx)
await self.bot_say(ctx, self.count_ignored())
@commands.group(aliases = ["respect"], invoke_without_command = True, case_insensitive = True)
async def respects(self, ctx):
'''
Press F to Pay Respects
https://knowyourmeme.com/memes/press-f-to-pay-respects
'''
await ctx.send_help(ctx.command)
@commands.group(pass_context=True, no_pm=True, invoke_without_command=True)
async def remimage(self, ctx, cmd):
"""Add images for the bot to upload per server"""
if ctx.invoked_subcommand is None:
await ctx.invoke(self.rem_image_server, cmd=cmd)
@commands.group(case_insensitive=True)
@commands.guild_only()
@commands.has_permissions(manage_guild=True)
async def bossnotifier(self, ctx):
"""Sends the next two bosses every 15 minutes to a channel
"""
if ctx.invoked_subcommand is None:
return await ctx.send_help(ctx.command)
@commands.group(invoke_without_command=True, aliases=['user', 'uinfo', 'info', 'ui'])
async def userinfo(self, ctx, *, name=""):
"""Get user info. Ex: [p]info @user"""
if ctx.invoked_subcommand is None:
pre = cmd_prefix_len()
if name:
try:
user = ctx.message.mentions[0]
except IndexError:
user = ctx.guild.get_member_named(name)
if not user:
user = ctx.guild.get_member(int(name))
if not user:
user = self.bot.get_user(int(name))
if not user:
await ctx.send(self.bot.bot_prefix + 'Could not find user.')
return