parent
5252514c87
commit
5fc802f6e7
2 changed files with 11 additions and 1 deletions
@ -1,12 +1,13 @@ |
||||
# -*- coding: utf-8 -*- |
||||
from __future__ import absolute_import |
||||
|
||||
import pmxbot |
||||
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') |
||||
client = wolframalpha.Client(pmxbot.config['Wolfram|Alpha API key']) |
||||
res = client.query(rest) |
||||
return next(res.results).text |
||||
|
Loading…
Reference in new issue