From 36fce2ff816e9cd4d544440605fe595573bfbd83 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Sun, 25 Jun 2023 02:50:29 -0400 Subject: [PATCH] Fixed line stripping --- scroll.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scroll.py b/scroll.py index 0f99e5f..438144c 100644 --- a/scroll.py +++ b/scroll.py @@ -156,12 +156,11 @@ class Bot(): else: await self.action(chan, 'the ascii gods have chosen... ' + color(name, cyan)) for line in ascii: - line = line.replace('\n','').replace('\r','') try: line = line.decode() except: - line = line.encode(chardet.detect(line)['encoding']).decode() # Get fucked UTF-16 - await self.sendmsg(chan, line + reset) + line = line.encode(chardet.detect(line)['encoding']).decode() # Get fucked UTF-16 + await self.sendmsg(chan, line.replace('\n','').replace('\r','') + reset) await asyncio.sleep(self.settings['msg']) else: await self.irc_error(chan, 'invalid name', name)