Skip to content

Commit

Permalink
simple
Browse files Browse the repository at this point in the history
  • Loading branch information
Vɪᴠᴇᴋ authored Jun 3, 2021
1 parent ff58b07 commit 3462f33
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
logging.basicConfig(level=logging.INFO)


TGraph = Client(
tgraph = Client(
"Image upload bot",
bot_token=Credentials.BOT_TOKEN,
api_id=Credentials.API_ID,
api_hash=Credentials.API_HASH,
)


@TGraph.on_message(filters.command("start"))
@tgraph.on_message(filters.command("start"))
async def start(client, message):
await message.reply_text(
text=f"Hello {message.from_user.first_name},\nIm telegram to telegra.ph image uploader bot by @W4RR10R",
text=f"Hello {message.from_user.mention},\nI'm A telegram to telegra.ph image uploader bot by @W4RR10R",
disable_web_page_preview=True
)


@TGraph.on_message(filters.photo)
@tgraph.on_message(filters.photo)
async def getimage(client, message):
tmp = os.path.join("downloads", str(message.chat.id))
if not os.path.isdir(tmp):
Expand All @@ -48,4 +48,4 @@ async def getimage(client, message):
shutil.rmtree(tmp, ignore_errors=True)


TGraph.run()
tgraph.run()

0 comments on commit 3462f33

Please sign in to comment.