Compare commits

..

No commits in common. "180cb159a7532c9f2ad1f235e21735624e7c2fe5" and "aee180767d68daa5ae27127a8f043cf8d9996351" have entirely different histories.

3 changed files with 2 additions and 10 deletions

View File

@ -4,7 +4,7 @@ It's like Sopel, except rewritten from scratch using Twisted as a base and over
## Requirements ## Requirements
Python 3.6+ Python 3.6+
Python packages: `twisted python-dateutil requests bs4 wolframalpha pyenchant emoji Pillow xml2dict ipython numpy numpngw` Python packages: `twisted, python-dateutil, requests, bs4, wolfram, pyenchant, emoji, Pillow, xml2dict, ipython, numpy, numpngw`
## Config ## Config
`nickname` - The nickname the bot will use. `nickname` - The nickname the bot will use.

7
bot.py
View File

@ -616,13 +616,6 @@ class Fulvia(irc.IRCClient):
self.whoisIdle(nick, idle, signon) self.whoisIdle(nick, idle, signon)
def lineReceived(self, line):
"""Overridden to fix broken unicode issues."""
if bytes != str and isinstance(line, bytes):
line = line.decode('utf-8', errors='surrogateescape')
super().lineReceived(line)
class FulviaWrapper(): class FulviaWrapper():
""" """
A wrapper class for Fulvia to provide default destinations for msg A wrapper class for Fulvia to provide default destinations for msg

View File

@ -41,9 +41,8 @@ def py(bot, trigger):
res = requests.get(uri + query) res = requests.get(uri + query)
res.raise_for_status() res.raise_for_status()
answer = res.text answer = res.text
answer = answer[:2000]
if answer: if answer:
#bot.msg can potentially lead to 3rd party commands triggering. #bot.msg can potentially lead to 3rd party commands triggering.
bot.msg(answer, length=300) bot.msg(answer)
else: else:
bot.reply('Sorry, no result.') bot.reply('Sorry, no result.')