python类send_cmd_help()的实例源码

coupon.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def coupon(self, ctx):
        """Coupon commands"""
        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
animelist.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def mal(self, ctx):
        """MAL Search Commands"""

        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
pokedex.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def pokemon(self, ctx):
        """This is the list of Pokémon queries you can perform."""

        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
raffle.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def _raffle(self, ctx):
        """Raffle Commands"""
        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
heist.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def heist(self, ctx):
        """General heist related commands"""

        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
heist.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def setheist(self, ctx):
        """Set different options in the heist config"""

        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
dicetable.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def dtable(self, ctx):
        """Shows a list under this group commands."""

        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
race.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def race(self, ctx):
        """Race cog's group command"""

        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
race.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def setrace(self, ctx):
        """Race cog's settings group command"""

        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
casino.py 文件源码 项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def setcasino(self, ctx):
        """Configures Casino Options"""
        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
Announcer.py 文件源码 项目:youtube 作者: FishyFing 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def announce(self, ctx):
        """Manages video announcing"""
        if ctx.invoked_subcommand is None:
            await send_cmd_help()
Announcer.py 文件源码 项目:youtube 作者: FishyFing 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def settings(self, ctx):
        """Manages settings for video announcing"""
        guild = ctx.message.guild
        channel = ctx.message.channel
        settings = self.ids[guild.id]
        if ctx.invoked_subcommand is None:
            msg = "```"
            for k, v in settings.items():
                msg += "{}: {}\n".format(k, v)
            msg += "```"
            await send_cmd_help(ctx)
            await ctx.send(msg)
quickembed.py 文件源码 项目:Sitryk-Cogs 作者: Sitryk 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def _qeset(self, ctx):
        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
            await self.bot.say("```\nDEFAULT COLOUR: {}\n```".format(self.data["default_colour"]))
quickembed.py 文件源码 项目:Sitryk-Cogs 作者: Sitryk 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def qembed(self, ctx, text, color=None):
        """Used to make a quick embed

        {server} is ctx.message.server
        {author} is ctx.message.author
        {channel} is ctx.message.channel
        {message} is ctx.message
        {ctx} is ctx
        """

        if color is None:
            embed_color = self.colours[self.data["default_colour"]]()
        elif color.lower() not in self.colours:
            if color.startswith('#'):
                color = color[1:]
            try:
                if validhex(int(color, 16)):
                    embed_color = discord.Color(int(color, 16))
            except ValueError:
                await send_cmd_help(ctx)
                return
            if not validhex(int(color, 16)):
                await send_cmd_help(ctx)
                return
        else:
            embed_color = self.colours[color]()

        embed = discord.Embed(description=text.format(server=ctx.message.server, author=ctx.message.author, channel=ctx.message.channel, message=ctx.message, ctx=ctx), color=embed_color)
        await self.bot.say(embed=embed)
randomshizzle.py 文件源码 项目:PTSCogs 作者: PlanetTeamSpeakk 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def colorrole(self, ctx, color):
        """Creates a colored role for you!

        Example
        [p]colorrole #8C5200
        Hex pls."""
        if not color.startswith("#"):
            await send_cmd_help(ctx)
            return
        colorhex = color[1:]
        color_role = await self.bot.create_role(server=ctx.message.server, name=color, colour=discord.Colour(value=int(colorhex, 16)))
        await self.bot.add_roles(ctx.message.author, color_role)
        await self.bot.say("Done!")
adkillr.py 文件源码 项目:PTSCogs 作者: PlanetTeamSpeakk 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def _adkillr(self, ctx):
        """Manages the settings for Adkillr."""
        serverid = ctx.message.server.id
        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
        if serverid not in self.adkillr:
            self.adkillr[serverid] = {'toggle': True, 'message': '{0.mention} don\'t send links!', 'filters': []}
            dataIO.save_json("data/adkillr/adkillr.json", self.adkillr)
serverinfo.py 文件源码 项目:PTSCogs 作者: PlanetTeamSpeakk 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def _server(self, ctx):
        """Server info commands."""
        if ctx.invoked_subcommand is None:
            await send_cmd_help(ctx)
ftpstats.py 文件源码 项目:PTSCogs 作者: PlanetTeamSpeakk 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def ftpset(self, ctx):
        """Manage all ftpstats settings"""
        if not ctx.invoked_subcommand:
            await send_cmd_help(ctx)
memes.py 文件源码 项目:PTSCogs 作者: PlanetTeamSpeakk 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def _airhornsong(self, ctx):
        """Some air horn songs."""
        if not ctx.invoked_subcommand:
            await send_cmd_help(ctx)
coder.py 文件源码 项目:PTSCogs 作者: PlanetTeamSpeakk 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def _from(self, ctx):
        """Convert a coded something to text."""
        if not ctx.invoked_subcommand:
            await send_cmd_help(ctx)


问题


面经


文章

微信
公众号

扫码关注公众号