Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -149,7 +149,7 @@ async def tiktok_downloader(client: Client, message: Message):
|
|
149 |
|
150 |
async def setup():
|
151 |
try:
|
152 |
-
await client.
|
153 |
logging.info("Bot started successfully")
|
154 |
await start_periodic_task()
|
155 |
# Run the client
|
@@ -157,4 +157,8 @@ async def setup():
|
|
157 |
except Exception as e:
|
158 |
logging.info(f"Error in setup: {e}")
|
159 |
|
160 |
-
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
async def setup():
|
151 |
try:
|
152 |
+
await client.run()
|
153 |
logging.info("Bot started successfully")
|
154 |
await start_periodic_task()
|
155 |
# Run the client
|
|
|
157 |
except Exception as e:
|
158 |
logging.info(f"Error in setup: {e}")
|
159 |
|
160 |
+
if __main__ == "__main__":
|
161 |
+
try:
|
162 |
+
await setup()
|
163 |
+
except Exception as e:
|
164 |
+
logging.info(str(e))
|