Skip to content

Commit 50ea288

Browse files
authored
Merge pull request eternnoir#333 from Kurbezz/master
Add methods to AsyncTeleBot
2 parents 1a70c2d + 34047c0 commit 50ea288

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

telebot/__init__.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,38 @@ def __init__(self, *args, **kwargs):
885885
def get_me(self):
886886
return TeleBot.get_me(self)
887887

888+
@util.async()
889+
def get_file(self, *args):
890+
return TeleBot.get_file(self, *args)
891+
892+
@util.async()
893+
def download_file(self, *args):
894+
return TeleBot.download_file(self, *args)
895+
888896
@util.async()
889897
def get_user_profile_photos(self, *args, **kwargs):
890898
return TeleBot.get_user_profile_photos(self, *args, **kwargs)
891899

900+
@util.async()
901+
def get_chat(self, *args):
902+
return TeleBot.get_chat(self, *args)
903+
904+
@util.async()
905+
def leave_chat(self, *args):
906+
return TeleBot.leave_chat(self, *args)
907+
908+
@util.async()
909+
def get_chat_administrators(self, *args):
910+
return TeleBot.get_chat_administrators(self, *args)
911+
912+
@util.async()
913+
def get_chat_members_count(self, *args):
914+
return TeleBot.get_chat_members_count(self, *args)
915+
916+
@util.async()
917+
def get_chat_member(self, *args):
918+
return TeleBot.get_chat_member(self, *args)
919+
892920
@util.async()
893921
def send_message(self, *args, **kwargs):
894922
return TeleBot.send_message(self, *args, **kwargs)
@@ -897,6 +925,10 @@ def send_message(self, *args, **kwargs):
897925
def forward_message(self, *args, **kwargs):
898926
return TeleBot.forward_message(self, *args, **kwargs)
899927

928+
@util.async()
929+
def delete_message(self, *args):
930+
return TeleBot.delete_message(self, *args)
931+
900932
@util.async()
901933
def send_photo(self, *args, **kwargs):
902934
return TeleBot.send_photo(self, *args, **kwargs)
@@ -905,6 +937,10 @@ def send_photo(self, *args, **kwargs):
905937
def send_audio(self, *args, **kwargs):
906938
return TeleBot.send_audio(self, *args, **kwargs)
907939

940+
@util.async()
941+
def send_voice(self, *args, **kwargs):
942+
return TeleBot.send_voice(self, *args, **kwargs)
943+
908944
@util.async()
909945
def send_document(self, *args, **kwargs):
910946
return TeleBot.send_document(self, *args, **kwargs)
@@ -921,6 +957,54 @@ def send_video(self, *args, **kwargs):
921957
def send_location(self, *args, **kwargs):
922958
return TeleBot.send_location(self, *args, **kwargs)
923959

960+
@util.async()
961+
def send_venue(self, *args, **kwargs):
962+
return TeleBot.send_venue(self, *args, **kwargs)
963+
964+
@util.async()
965+
def send_contact(self, *args, **kwargs):
966+
return TeleBot.send_contact(self, *args, **kwargs)
967+
924968
@util.async()
925969
def send_chat_action(self, *args, **kwargs):
926970
return TeleBot.send_chat_action(self, *args, **kwargs)
971+
972+
@util.async()
973+
def kick_chat_member(self, *args):
974+
return TeleBot.kick_chat_member(self, *args)
975+
976+
@util.async()
977+
def unban_chat_member(self, *args):
978+
return TeleBot.unban_chat_member(self, *args)
979+
980+
@util.async()
981+
def edit_message_text(self, *args, **kwargs):
982+
return TeleBot.edit_message_text(self, *args, **kwargs)
983+
984+
@util.async()
985+
def edit_message_reply_markup(self, *args, **kwargs):
986+
return TeleBot.edit_message_reply_markup(self, *args, **kwargs)
987+
988+
@util.async()
989+
def send_game(self, *args, **kwargs):
990+
return TeleBot.send_game(self, *args, **kwargs)
991+
992+
@util.async()
993+
def set_game_score(self, *args, **kwargs):
994+
return TeleBot.set_game_score(self, *args, **kwargs)
995+
996+
@util.async()
997+
def get_game_high_scores(self, *args, **kwargs):
998+
return TeleBot.get_game_high_scores(self, *args, **kwargs)
999+
1000+
@util.async()
1001+
def edit_message_caption(self, *args, **kwargs):
1002+
return TeleBot.edit_message_caption(self, *args, **kwargs)
1003+
1004+
@util.async()
1005+
def answer_inline_query(self, *args, **kwargs):
1006+
return TeleBot.answer_inline_query(self, *args, **kwargs)
1007+
1008+
@util.async()
1009+
def answer_callback_query(self, *args, **kwargs):
1010+
return TeleBot.answer_callback_query(self, *args, **kwargs)

0 commit comments

Comments
 (0)