hrbonz / bonzbot Goto Github PK
View Code? Open in Web Editor NEWthe #bonz butler
the #bonz butler
It would be great to add a new command set that would work like that:
query commands:
set a reddit account (create/update account)
<foobar> reddit account set myaccount login password
or
<foobar> reddit account set myaccount apikey
then it would answer
<bonzbot> account myaccount (created|updated)
delete a reddit account
<foobar> reddit account delete myaccount
then it would answer
<bonzbot> account myaccount deleted
show reddit account list
<foobar> reddit account list
<bonzbot> Account list:
<bonzbot> - reddit myaccount loginname
<bonzbot> - reddit myaccount loginname
add a subreddit linked to a reddit account
<foobar> reddit add myaccount /r/devel #mychannel
<bonzbot> subreddit output added
delete a subreddit linked to a reddit account
<foobar> reddit delete myaccount /r/devel #mychannel
<bonzbot> subreddit /r/devel deleted from myaccount
channel #mychannel commands:
<foobar> !reddit push /r/devel httplink tag1,tag2,tag3 description
<foobar> !reddit latest n /r/devel
<bonzbot> link#1 tags description
<bonzbot> link#2 tags description
[...]
<bonzbot> link#n tags description
When opening https://engineering.upside.com/a-beginners-guide-to-optimizing-pandas-code-for-speed-c09ef2c6a4d6
ERROR asyncio Exception in callback event.async_callback({'data': 'https://engi...-c09ef2c6a
4d6', 'event': 'PRIVMSG', 'mask': 'anhj!~anhj@l...2.litchis.org', 'target': '#bonz'})
handle: <Handle event.async_callback({'data': 'https://engi...-c09ef2c6a4d6', 'event': 'PRIVMSG
', 'mask': '[email protected]', 'target': '#bonz'})>
Traceback (most recent call last):
File "/home/hr/codaz/bonzbot/bonzbot/linkinfo/__init__.py", line 41, in get_title
soup = bs4.BeautifulSoup(urlopen(req, timeout=5), "lxml")
File "/usr/lib/python3.4/urllib/request.py", line 153, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.4/urllib/request.py", line 461, in open
response = meth(req, response)
File "/usr/lib/python3.4/urllib/request.py", line 571, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.4/urllib/request.py", line 493, in error
result = self._call_chain(*args)
File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(*args)
File "/usr/lib/python3.4/urllib/request.py", line 676, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python3.4/urllib/request.py", line 461, in open
response = meth(req, response)
File "/usr/lib/python3.4/urllib/request.py", line 571, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.4/urllib/request.py", line 499, in error
return self._call_chain(*args)
File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(*args)
File "/usr/lib/python3.4/urllib/request.py", line 579, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
self._callback(*self._args)
File "/home/hr/.virtualenvs/bonzbot3/lib/python3.4/site-packages/irc3/dec.py", line 54, in as
ync_callback
return self.callback(**kwargs)
File "/home/hr/codaz/bonzbot/bonzbot/linkinfo/__init__.py", line 68, in getlink
info = self.get_info(link)
File "/home/hr/codaz/bonzbot/bonzbot/linkinfo/__init__.py", line 58, in get_info
return _handler(match)
File "/home/hr/codaz/bonzbot/bonzbot/linkinfo/__init__.py", line 42, in get_title
except urllib2.HTTPError as e:
NameError: name 'urllib2' is not defined
Add a simple module to auto deop self, the bot should never have any special credentials in the chan.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.