fix strings copied from other project
This commit is contained in:
parent
364f68392b
commit
0bf5d92f1a
|
@ -42,7 +42,7 @@ class MatrixBotCallbacks:
|
||||||
def __init__(self, client: AsyncClient, config: dict):
|
def __init__(self, client: AsyncClient, config: dict):
|
||||||
self.client = client
|
self.client = client
|
||||||
self.config = config
|
self.config = config
|
||||||
self.logger = logging.getLogger('MatrixGPT').getChild('MatrixBotCallbacks')
|
self.logger = logging.getLogger('ExportBot').getChild('MatrixBotCallbacks')
|
||||||
self.startup_ts = time.time() * 1000
|
self.startup_ts = time.time() * 1000
|
||||||
self.seen_events = {}
|
self.seen_events = {}
|
||||||
self.exports = ExportTracker()
|
self.exports = ExportTracker()
|
||||||
|
|
|
@ -15,7 +15,7 @@ class MatrixClientHelper:
|
||||||
# Encryption is disabled because it's handled by Pantalaimon.
|
# Encryption is disabled because it's handled by Pantalaimon.
|
||||||
client_config = AsyncClientConfig(max_limit_exceeded=0, max_timeouts=0, store_sync_tokens=True, encryption_enabled=False)
|
client_config = AsyncClientConfig(max_limit_exceeded=0, max_timeouts=0, store_sync_tokens=True, encryption_enabled=False)
|
||||||
|
|
||||||
def __init__(self, user_id: str, passwd: str, homeserver: str, store_path: str, device_name: str = 'MatrixGPT'):
|
def __init__(self, user_id: str, passwd: str, homeserver: str, store_path: str, device_name: str = 'ExportBot'):
|
||||||
self.user_id = user_id
|
self.user_id = user_id
|
||||||
self.passwd = passwd
|
self.passwd = passwd
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class MatrixClientHelper:
|
||||||
|
|
||||||
self.device_name = device_name
|
self.device_name = device_name
|
||||||
self.client = AsyncClient(homeserver=self.homeserver, user=self.user_id, config=self.client_config, device_id=device_name)
|
self.client = AsyncClient(homeserver=self.homeserver, user=self.user_id, config=self.client_config, device_id=device_name)
|
||||||
self.logger = logging.getLogger('MatrixGPT').getChild('MatrixClientHelper')
|
self.logger = logging.getLogger('ExportBot').getChild('MatrixClientHelper')
|
||||||
|
|
||||||
async def login(self) -> tuple[bool, LoginError] | tuple[bool, LoginResponse | None]:
|
async def login(self) -> tuple[bool, LoginError] | tuple[bool, LoginResponse | None]:
|
||||||
try:
|
try:
|
||||||
|
|
2
main.py
2
main.py
|
@ -16,7 +16,7 @@ SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
async def main(args):
|
async def main(args):
|
||||||
logging.basicConfig()
|
logging.basicConfig()
|
||||||
logger = logging.getLogger('MatrixGPT')
|
logger = logging.getLogger('ExportBot')
|
||||||
|
|
||||||
with open(args.config) as stream:
|
with open(args.config) as stream:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue