mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Forward message method done.
This commit is contained in:
parent
e99815adcf
commit
67aaed4f20
@ -48,7 +48,7 @@ while True:
|
||||
|
||||
- [x] getMe
|
||||
- [x] sendMessage
|
||||
- [ ] forwardMessage
|
||||
- [x] forwardMessage
|
||||
- [ ] sendPhoto
|
||||
- [ ] sendAudio
|
||||
- [ ] sendDocument
|
||||
|
@ -111,4 +111,11 @@ class TeleBot:
|
||||
reply_markup)
|
||||
|
||||
def forward_message(self, chat_id, from_chat_id, message_id):
|
||||
"""
|
||||
|
||||
:param chat_id: which chat to forward
|
||||
:param from_chat_id: which chat message from
|
||||
:param message_id: message id
|
||||
:return:
|
||||
"""
|
||||
return apihelper.forward_message(self.token, chat_id, from_chat_id, message_id)
|
||||
|
@ -3,6 +3,7 @@
|
||||
import telebot
|
||||
import requests
|
||||
|
||||
|
||||
def get_me(token):
|
||||
api_url = telebot.API_URL
|
||||
method_url = r'getMe'
|
||||
@ -10,6 +11,7 @@ def get_me(token):
|
||||
req = requests.get(request_url)
|
||||
return req.json()
|
||||
|
||||
|
||||
def send_message(token, chat_id, text, disable_web_page_preview=None, reply_to_message_id=None, reply_markup=None):
|
||||
"""
|
||||
Use this method to send text messages. On success, the sent Message is returned.
|
||||
@ -34,6 +36,7 @@ def send_message(token, chat_id, text, disable_web_page_preview=None, reply_to_m
|
||||
req = requests.get(request_url, params=payload)
|
||||
return req.json()
|
||||
|
||||
|
||||
def get_updates(token):
|
||||
api_url = telebot.API_URL
|
||||
method_url = r'getUpdates'
|
||||
@ -41,6 +44,7 @@ def get_updates(token):
|
||||
req = requests.get(request_url)
|
||||
return req.json()
|
||||
|
||||
|
||||
def forward_message(token, chat_id, from_chat_id, message_id):
|
||||
api_url = telebot.API_URL
|
||||
method_url = r'forwardMessage'
|
||||
|
Loading…
Reference in New Issue
Block a user