diff --git a/.gitignore b/.gitignore index 2206544..7da418f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -.codegpt \ No newline at end of file +.codegpt +contacts.db diff --git a/contacts.db b/contacts.db index b177e8c..2b04949 100644 Binary files a/contacts.db and b/contacts.db differ diff --git a/main.py b/main.py deleted file mode 100644 index 552f954..0000000 --- a/main.py +++ /dev/null @@ -1,6 +0,0 @@ -def main(): - print("Hello from whatsapp-api!") - - -if __name__ == "__main__": - main() diff --git a/send_daily_msg.py b/send_daily_msg.py index 231df06..fa32fd2 100644 --- a/send_daily_msg.py +++ b/send_daily_msg.py @@ -29,10 +29,6 @@ def createContactsDB(): except sqlite3.OperationalError as e: print("Failed to create tables:", e) -async def fetch(client, url): - response = await client.get(url) - return response.json() - def getContactList(): api = f'{url}/getContacts/{session}' with httpx.Client() as client: @@ -53,6 +49,10 @@ def init_db(): except sqlite3.OperationalError as e: print("Failed to load table:", e) +async def fetch(client, url): + response = await client.get(url) + return response.json() + async def main(): init_db() ''' @@ -63,7 +63,5 @@ async def main(): print(result) ''' - if __name__ == '__main__': - asyncio.run(main()) - + asyncio.run(main()) \ No newline at end of file