From 08d6ab549df8fdf5bda49b175bec69229de01452 Mon Sep 17 00:00:00 2001 From: Kylmakalle Date: Fri, 7 Jul 2017 00:54:18 +0300 Subject: [PATCH] Aync Methods for v3.1 --- telebot/__init__.py | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 6356b80..e3948ff 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -1215,13 +1215,49 @@ class AsyncTeleBot(TeleBot): return TeleBot.send_chat_action(self, *args, **kwargs) @util.async() - def kick_chat_member(self, *args): - return TeleBot.kick_chat_member(self, *args) + def kick_chat_member(self, *args, **kwargs): + return TeleBot.kick_chat_member(self, *args, **kwargs) @util.async() def unban_chat_member(self, *args): return TeleBot.unban_chat_member(self, *args) + @util.async() + def restrict_chat_member(self, *args, **kwargs): + return TeleBot.restrict_chat_member(self, *args, **kwargs) + + @util.async() + def promote_chat_member(self, *args, **kwargs): + return TeleBot.promote_chat_member(self, *args, **kwargs) + + @util.async() + def export_chat_invite_link(self, *args): + return TeleBot.export_chat_invite_link(self, *args) + + @util.async() + def set_chat_photo(self, *args): + return TeleBot.set_chat_photo(self, *args) + + @util.async() + def delete_chat_photo(self, *args): + return TeleBot.delete_chat_photo(self, *args) + + @util.async() + def set_chat_title(self, *args): + return TeleBot.set_chat_title(self, *args) + + @util.async() + def set_chat_description(self, *args): + return TeleBot.set_chat_description(self, *args) + + @util.async() + def pin_chat_message(self, *args, **kwargs): + return TeleBot.pin_chat_message(self, *args, **kwargs) + + @util.async() + def unpin_chat_message(self, *args): + return TeleBot.unpin_chat_message(self, *args) + @util.async() def edit_message_text(self, *args, **kwargs): return TeleBot.edit_message_text(self, *args, **kwargs)