Skip to content

Instantly share code, notes, and snippets.

@ni5arga
Created January 24, 2022 15:28
Show Gist options
  • Save ni5arga/ecb8cd4926feb3383afc84832ab99aaa to your computer and use it in GitHub Desktop.
Save ni5arga/ecb8cd4926feb3383afc84832ab99aaa to your computer and use it in GitHub Desktop.
Pyrogram Bolierplate
from asyncio import run
from pyrogram import Client, filters, idle
from config import API_ID, API_HASH, BOT_TOKEN
client = Client(
":memory:",
api_id=API_ID,
api_hash=API_HASH,
bot_token=BOT_TOKEN
) # State API_ID, API_HASH & BOT_TAKEN in config.py
async def main():
await client.start()
print("Started")
await idle()
run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment