async def echo(self, ctx, *, msg):
     """Echos a message."""
     try:
         await ctx.message.delete()
     except:
         pass
     await ctx.send(ctx.author.display_name + ": " +
                    clean_content(msg, ctx))
Example #2
0
    async def echo(self, ctx, *, msg):
        """Echos a message."""
        try:
            await self.bot.delete_message(ctx.message)
        except:
            pass

        await self.bot.say(ctx.message.author.display_name + ": " +
                           clean_content(msg, ctx))
Example #3
0
    async def techo(self, ctx, seconds: int, *, msg):
        """Echos a message, and deletes it after a few seconds."""
        try:
            await self.bot.delete_message(ctx.message)
        except:
            pass

        seconds = min(max(0, seconds), 600)

        await self.bot.say(ctx.message.author.display_name + ": " +
                           clean_content(msg, ctx),
                           delete_after=seconds)
Example #4
0
 async def test(self, ctx, *, teststr):
     """Parses `str` as if it were in an alias, for testing."""
     char = await Character.from_ctx(ctx)
     parsed = await char.parse_cvars(teststr, ctx)
     parsed = clean_content(parsed, ctx)
     await ctx.send(f"{ctx.author.display_name}: {parsed}")
Example #5
0
 async def test(self, ctx, *, str):
     """Parses `str` as if it were in an alias, for testing."""
     char = Character.from_ctx(ctx)
     parsed = await char.parse_cvars(str, ctx)
     parsed = clean_content(parsed, ctx)
     await self.bot.say(f"{ctx.message.author.display_name}: {parsed}")