예제 #1
0
 async def invite(self, ctx):
     invite_embed = discord.Embed(
         description = '[Invite me!](https://discordapp.com/api/oauth2/authorize?client_id='+str(ctx.bot.user.id)+'&permissions=0&scope=bot)',
         colour = discord.Colour.gold()
     )
     invite_embed.set_thumbnail(url=ctx.bot.user.avatar_url)
     invite_embed.set_author(name = str(ctx.author), icon_url = ctx.author.avatar_url)
     invite_embed.set_footer(text = misc.get_embed_footer(ctx))
     await ctx.send(embed=invite_embed)
예제 #2
0
 async def _8ball(self, ctx, *, args=''):
     choices = ['Maybe...', 'Not entirely sure.', 'Seems probable.', 'Count on it.', 'Most definitely.', 'Would not bet on it.', 'Unsure. Unlikely though.', 'Oh, definitely not.']
     choice = random.choice(choices)
     choice_embed = discord.Embed(
         description = choice,
         colour = discord.Colour.gold()
     )
     choice_embed.set_footer(text = misc.get_embed_footer(ctx))
     choice_embed.set_author(name=str(ctx.author), icon_url=ctx.author.avatar_url)
     await ctx.send(embed=choice_embed)
예제 #3
0
 async def pickuser(self, ctx):
     pick = random.choice([member for member in ctx.guild.members if not member.bot])
     pick_embed = discord.Embed(
         title = 'I pick...',
         description = pick.mention+'!',
         colour = discord.Colour.gold()
     )
     pick_embed.set_footer(text = misc.get_embed_footer(ctx))
     pick_embed.set_author(name=str(ctx.author), icon_url=ctx.author.avatar_url)
     await ctx.send(embed=pick_embed)
예제 #4
0
async def source(ctx):
    source_embed = discord.Embed(
        title = 'Bot Source',
        description = 'The full source code is available at\n'+settings.source+'\nand is licensed under '+settings.license+'.',
        colour = discord.Colour.gold()
    )
    source_embed.set_thumbnail(url = ctx.bot.user.avatar_url)
    source_embed.set_footer(text = misc.get_embed_footer(ctx))
    source_embed.set_author(name=str(ctx.author), icon_url=ctx.author.avatar_url)
    await ctx.send(embed = source_embed)
예제 #5
0
 async def choose(self, ctx, *, options):
     picks = options.split(',')
     choice = random.choice(picks).strip()
     pick_embed = discord.Embed(
         description = 'I pick '+choice+'.',
         colour = discord.Colour.gold()
     )
     pick_embed.set_footer(text = misc.get_embed_footer(ctx))
     pick_embed.set_author(name=str(ctx.author), icon_url=ctx.author.avatar_url)
     await ctx.send(embed=pick_embed)
예제 #6
0
async def ping(ctx):
    ping_embed = discord.Embed(
        title = 'Pong!',
        description = 'Bot latency: `'+str(int(ctx.bot.latency*1000))+' ms`',
        colour = discord.Colour.gold()
    )
    ping_embed.set_thumbnail(url=ctx.bot.user.avatar_url)
    ping_embed.set_author(name = str(ctx.author), icon_url = ctx.author.avatar_url)
    ping_embed.set_footer(text = misc.get_embed_footer(ctx))
    await ctx.send(embed=ping_embed)
예제 #7
0
async def info(ctx):
    info_embed = discord.Embed(
        title = 'Bot Info',
        description = 'I\'m '+ctx.bot.user.mention+', and I was created by '+str(ctx.bot.appinfo.owner)+'.\nSee `'+ctx.bot.command_prefix+'help` for a list of commands.\nI can see `'+str(len(bot.guilds))+'` servers and have a latency of `'+str(int(bot.latency*1000))+'` ms.',
        colour = discord.Colour.gold()
    )
    info_embed.set_thumbnail(url = ctx.bot.user.avatar_url)
    info_embed.set_author(name = str(ctx.author), icon_url = ctx.author.avatar_url)
    info_embed.set_footer(text = misc.get_embed_footer(ctx))
    await ctx.send(embed = info_embed)
예제 #8
0
    async def send_command_help(self, command):
        ctx = self.context
        help_embed = discord.Embed(
            title = self.get_command_signature(command),
            description = command.help,
            colour = discord.Colour.gold()
        )
        help_embed.set_footer(text = misc.get_embed_footer(ctx))
        help_embed.set_author(name=str(ctx.author), icon_url=ctx.author.avatar_url)

        await self.get_destination().send(embed = help_embed)
예제 #9
0
    async def send_group_help(self, group):
        ctx = self.context
        commands = ', '.join([command.qualified_name for command in group.commands])
        help_embed = discord.Embed(
            title = group.qualified_name + ' Subcommands',
            description = commands,
            colour = discord.Colour.gold()
        )
        help_embed.set_footer(text = misc.get_embed_footer(ctx))
        help_embed.set_author(name=str(ctx.author), icon_url=ctx.author.avatar_url)

        await self.get_destination().send(embed = help_embed)
예제 #10
0
 async def serverinfo(self, ctx):
     guild = ctx.guild
     info_embed = discord.Embed(
         title = ctx.guild.name,
         colour = discord.Colour.gold()
     )
     info_embed.add_field(
         name = 'General',
         value = 'Total members: '+str(len(guild.members))+'\nBot users: '+str(len([member for member in guild.members if member.bot]))+'\nTotal Channels: '+str(len(guild.channels)-len(guild.categories))+'\nText Channels: '+str(len(guild.text_channels))+'\nVoice Channels: '+str(len(guild.voice_channels))
     )
     info_embed.add_field(
         name = 'Server',
         value = 'Owner: '+ctx.guild.owner.mention+'\nTotal Roles: '+str(len(guild.roles))+'\nServer Region: `'+str(guild.region)+'`\nGuild ID: `'+str(guild.id)+'`'
     )
     info_embed.set_thumbnail(url = guild.icon_url)
     info_embed.set_author(name = str(ctx.author), icon_url = ctx.author.avatar_url)
     info_embed.set_footer(text = misc.get_embed_footer(ctx))
     await ctx.send(embed=info_embed)
예제 #11
0
    async def send_bot_help(self, mapping):
        ctx = self.context
        help_embed = discord.Embed(
            title = 'Commands',
            description = self.get_opening_note(),
            colour = discord.Colour.gold()
        )
        help_embed.set_footer(text = misc.get_embed_footer(ctx))
        help_embed.set_author(name=str(ctx.author), icon_url=ctx.author.avatar_url)
        for cog in mapping.keys():

            name = 'Other'
            if cog != None:
                name = cog.qualified_name
                if hasattr(cog, 'custom_icon'):
                    name = cog.custom_icon + ' ' + name

            help_embed.add_field(name = name, value = ', '.join([command.name for command in mapping[cog]]))

        await self.get_destination().send(embed = help_embed)