-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBokoto.py
More file actions
44 lines (18 loc) · 899 Bytes
/
Bokoto.py
File metadata and controls
44 lines (18 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
günlüğü içe aktar
telegram.ext içe aktarma Güncelleyicisi, CommandHandler'dan
içe aktarma istekleri
# URL yükleme işlevini tanımlayın
def upload_url(bot, güncelleme):
metin = update.message.text
url = text[8:] # "/upload " önekini kaldır
# URL'yi bir bulut depolama hizmetine yükleyin (örn. Google Drive)
# Ardından, Telegram Bot API'sini kullanarak dosya bağlantısını kullanıcıya gönderin
bot.send_message(chat_id=update.message.chat_id, text="URL yüklendi.\nDosya bağlantısı: <file_link>")
# Telegram Bot API'sini kurun
güncelleyici = Güncelleyici(token='5857821445:AAHrCIPNR2rbxB0b4g2iXsIbWn56DYkSy7c')
gönderici = updater.dispatcher
# "/upload" komutu için bir komut işleyici ekleyin
upload_handler = CommandHandler('yükle', upload_url)
dispeçer.add_handler(upload_handler)
# Botu başlat
updater.start_polling()