tabs moment happens

This commit is contained in:
Your Name 2024-12-21 09:18:43 +03:00
parent db4f61bda5
commit 7ca9d3fbfd

10
ubot.py
View file

@ -18,7 +18,7 @@ import pymysql.cursors
import sqlite3 import sqlite3
if os.name == 'nt': if os.name == 'nt':
import win32api import win32api
logger.remove() logger.remove()
logger.level("DEBUG", color='<magenta>') logger.level("DEBUG", color='<magenta>')
@ -34,10 +34,10 @@ async def main():
my_id = int(me.id) my_id = int(me.id)
my_fn = me.first_name my_fn = me.first_name
logger.info(f'your id: {my_id}') logger.info(f'your id: {my_id}')
if os.name == 'nt': if os.name == 'nt':
win32api.SetConsoleTitle(f'{my_id}') win32api.SetConsoleTitle(f'{my_id}')
elif os.name == 'posix': elif os.name == 'posix':
print(f'\33]0;bot {my_id}\a', end='', flush=True) print(f'\33]0;bot {my_id}\a', end='', flush=True)
if config.db_pymysql: if config.db_pymysql:
con = pymysql.connect(host='localhost', con = pymysql.connect(host='localhost',
user='root', user='root',