1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-24 14:27:27 +00:00

Removed global nl

This commit is contained in:
Myned 2017-10-20 16:24:19 -04:00
parent 51a002bb3f
commit 9edaac7803

View file

@ -14,8 +14,6 @@ from misc import exceptions as exc
from misc import checks
from utils import utils as u
nl = re.compile('\n')
class Bot:
@ -99,9 +97,8 @@ class Tools:
return await d.send('```python\n{}```'.format(self.format(i, o)))
async def refresh(self, m, i='', o=''):
global nl
output = m.content[10:-2]
if len(nl.findall(output)) <= 20:
output = m.content[9:-3]
if len(re.findall('\n', output)) <= 20:
await m.edit(content='```python\n{}\n{}\n>>>```'.format(output, self.format(i, o)))
else:
await m.edit(content='```python\n{}```'.format(self.format(i, o)))