Add pmxbot command

This commit is contained in:
Jason R. Coombs
2015-12-10 18:34:25 -05:00
parent f7ccbc5a35
commit acdfbd6593
3 changed files with 18 additions and 0 deletions

10
wolframalpha/pmxbot.py Normal file
View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from pmxbot.core import command
import wolframalpha
@command("wolframalpha", aliases=('wa',), doc="Wolfram Alpha rules")
def wa(client, event, channel, nick, rest):
client = wolframalpha.Client('Q59EW4-UEL27J79UK')
res = client.query(rest)
return next(res.results).text