i hate windows, but this for compatibility reasons...
This commit is contained in:
parent
5ea22e534b
commit
db4f61bda5
1 changed files with 6 additions and 2 deletions
8
ubot.py
8
ubot.py
|
@ -17,6 +17,8 @@ import pymysql
|
|||
import pymysql.cursors
|
||||
import sqlite3
|
||||
|
||||
if os.name == 'nt':
|
||||
import win32api
|
||||
|
||||
logger.remove()
|
||||
logger.level("DEBUG", color='<magenta>')
|
||||
|
@ -32,6 +34,10 @@ async def main():
|
|||
my_id = int(me.id)
|
||||
my_fn = me.first_name
|
||||
logger.info(f'your id: {my_id}')
|
||||
if os.name == 'nt':
|
||||
win32api.SetConsoleTitle(f'{my_id}')
|
||||
elif os.name == 'posix':
|
||||
print(f'\33]0;bot {my_id}\a', end='', flush=True)
|
||||
if config.db_pymysql:
|
||||
con = pymysql.connect(host='localhost',
|
||||
user='root',
|
||||
|
@ -170,8 +176,6 @@ async def main():
|
|||
####################################################################
|
||||
if is_termux:
|
||||
asyncio.ensure_future(updatenotif.git_notifications_update())
|
||||
elif os.name == 'posix':
|
||||
print(f'\33]0;bot {my_id}\a', end='', flush=True)
|
||||
await victimsbackup.bio_backup_stealing(client, c, conn, default_directory)
|
||||
|
||||
if config.db_pymysql:
|
||||
|
|
Loading…
Reference in a new issue