txlyre 11 bulan lalu
induk
melakukan
799d6c5ab3
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      commands.py

+ 2 - 1
commands.py

@@ -545,13 +545,14 @@ async def sylvy_handler(bot, event, command):
     text += '\n'
 
   text += result['output']
+  text = text.strip()
 
   await event.reply(
     text,
     formatting_entities=[
       MessageEntityCode(
         offset=0,
-        length=len(text.strip())
+        length=len(text.encode('utf-16')) // 2
       )
     ]
   )