diff options
author | romangraef <roman.graef@gmail.com> | 2018-05-15 20:02:18 +0200 |
---|---|---|
committer | romangraef <roman.graef@gmail.com> | 2018-05-15 20:02:18 +0200 |
commit | 9187528a1e4d96aee5381138547c62ed7e281aa8 (patch) | |
tree | 5aaea27d46ba55d54866cacb130425cbcd560896 /stream_cog.py | |
parent | 50787a7a3c14b8cbe1890cfdc62bc1d27171209c (diff) | |
download | fuckingselfbot-master.tar.gz fuckingselfbot-master.tar.bz2 fuckingselfbot-master.zip |
Diffstat (limited to 'stream_cog.py')
-rw-r--r-- | stream_cog.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/stream_cog.py b/stream_cog.py new file mode 100644 index 0000000..20ae77c --- /dev/null +++ b/stream_cog.py @@ -0,0 +1,26 @@ +import discord +from discord.ext import commands +from discord.ext.commands import Context as CommandContext + +from query import parse + + +class StreamCog(object): + def __init__(self, bot): + self.bot: commands.Bot = bot + + @commands.command() + async def stream(self, ctx: CommandContext, *, to_eval): + val = parse(to_eval, + guild=ctx.guild, + channel=ctx.channel, + author=ctx.author, + bot=self.bot, + client=self.bot, + discord=discord, + ) + await ctx.send(repr(val)) + + +def setup(bot: commands.Bot): + bot.add_cog(StreamCog(bot)) |