summaryrefslogtreecommitdiff
path: root/stream_cog.py
diff options
context:
space:
mode:
authorromangraef <roman.graef@gmail.com>2018-05-15 20:02:18 +0200
committerromangraef <roman.graef@gmail.com>2018-05-15 20:02:18 +0200
commit9187528a1e4d96aee5381138547c62ed7e281aa8 (patch)
tree5aaea27d46ba55d54866cacb130425cbcd560896 /stream_cog.py
parent50787a7a3c14b8cbe1890cfdc62bc1d27171209c (diff)
downloadfuckingselfbot-master.tar.gz
fuckingselfbot-master.tar.bz2
fuckingselfbot-master.zip
~stream languageHEADmaster
Diffstat (limited to 'stream_cog.py')
-rw-r--r--stream_cog.py26
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))