Skip to content

Commit

Permalink
multiple lang
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammedfurkan committed Nov 15, 2020
1 parent 24a145d commit 48c7bb6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@

msg = """
Merhaba ben Pinterest üzerinden Video ve Resim indirebilen bir botum.
`Hello, I am a bot that can download Videos and Images via Pinterest.`
Şunları yapabilirim:
`I can:`
👉 **Video indirmek için:** `/pvid pinterestURL`
👉 **To download a video:** `/pvid pinterestURL`
👉 **Resim indirebilmek için:** `/pimg pinterestURL`
👉 **To download a image:** `/pimg pinterestURL`
"""


Expand Down Expand Up @@ -114,7 +119,7 @@ async def vid(event):
event.chat_id,
j,
thumb=thumb,
caption="**@Pinterestdown_Robot** tarafından indirilmiştir",
caption="**@Pinterestdown_Robot** tarafından indirilmiştir\n\nDownloaded by **@Pinterestdown_Robot**",
force_document=False,
allow_cache=False,
reply_to=event.message.id,
Expand All @@ -137,7 +142,7 @@ async def vid(event):
os.remove(TMP_DOWNLOAD_DIRECTORY + 'pinterest_video.mp4')
os.remove(thumb_image_path)
else:
await event.reply("**bana komutla beraber link gönder.**")
await event.reply("**bana komutla beraber link gönder.**\n\n`send me the link with the command.`")
except FileNotFoundError:
return

Expand All @@ -161,7 +166,7 @@ async def img(event):
])
url = event.pattern_match.group(1)
if url:
x = await event.reply("`İşlem yapılıyor lütfen bekleyiniz...`")
x = await event.reply("`İşlem yapılıyor lütfen bekleyiniz...`\n\nProcessing please wait ...")
get_url = get_download_url(url)
j = download_image(get_url)

Expand All @@ -171,7 +176,7 @@ async def img(event):
await event.client.send_file(
event.chat_id,
j,
caption="**@Pinterestdown_Robot** tarafından indirilmiştir",
caption="**@Pinterestdown_Robot** tarafından indirilmiştir\n\nDownloaded by **@Pinterestdown_Robot**",
force_document=False,
allow_cache=False,
reply_to=event.message.id,
Expand All @@ -184,7 +189,7 @@ async def img(event):
await x.delete()
os.remove(TMP_DOWNLOAD_DIRECTORY + 'pinterest_iamge.jpg')
else:
await event.reply("**bana komutla beraber link gönder.**")
await event.reply("**bana komutla beraber link gönder.**\n\n`send me the link with the command.`")


async def run_command(command: List[str]) -> (str, str):
Expand Down

0 comments on commit 48c7bb6

Please sign in to comment.