diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index 4f4a246..f2071a0 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -11,7 +11,7 @@ __author__ = "Davide Testa" __email__ = "davide@davte.it" __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __license__ = "GNU General Public License v3.0" -__version__ = "2.8.12" +__version__ = "2.8.13" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/api.py b/davtelepot/api.py index 8c23a5f..02902de 100644 --- a/davtelepot/api.py +++ b/davtelepot/api.py @@ -1091,6 +1091,7 @@ class TelegramBot: async def restrictChatMember(self, chat_id: Union[int, str], user_id: int, permissions: Dict[str, bool], + use_independent_chat_permissions: bool = None, until_date: Union[datetime.datetime, int] = None): """Restrict a user in a supergroup. @@ -1814,7 +1815,8 @@ class TelegramBot: async def setChatPermissions(self, chat_id: Union[int, str] = None, permissions: Union[ChatPermissions, - dict] = None): + dict] = None, + use_independent_chat_permissions: bool = None): """Set default chat permissions for all members. Use this method to set default chat permissions for all members. diff --git a/merge_and_push.sh b/merge_and_push.sh deleted file mode 100644 index feff927..0000000 --- a/merge_and_push.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# Merge develop into master and push both branches; checkout to develop at the end. - -git checkout master; -git merge develop; -git checkout develop; -git push origin master develop; -git push bitbucket master develop; -git push github master; diff --git a/push_to_remotes.sh b/push_to_remotes.sh new file mode 100644 index 0000000..13aa4be --- /dev/null +++ b/push_to_remotes.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Merge develop into master and push both branches; checkout to develop at the end. + +git push origin main develop; +git push bitbucket main develop; +git push github main; diff --git a/update_package.sh b/update_package.sh old mode 100644 new mode 100755 index 7d0eefa..8e4a23f --- a/update_package.sh +++ b/update_package.sh @@ -5,20 +5,20 @@ this_script_directory=$(cd "$(dirname "$0")" && pwd) packenv=""; # Python virtual environment directory: packenv variable in my_config.sh -source $this_script_directory/my_config.sh; +source "$this_script_directory"/my_config.sh; # Ensure the success of importing procedure -if [ -z ${packenv} ]; +if [ -z "${packenv}" ]; then printf "Please set in ""my_config.sh"" the path to bot python virtual environment\n\nExample:\npackenv=""path/to/virtual/env""\n"; exit; fi -# Merge, push, build and publish package to pypi.org -bash merge_and_push.sh; +# Push, build and publish package to pypi.org +bash "$this_script_directory"/push_to_remotes.sh; rm -rf "$this_script_directory/build"; rm -rf "$this_script_directory/dist"; rm -rf "$this_script_directory/davtelepot.egg-info"; -$packenv/python setup.py sdist; -$packenv/pip wheel --no-index --no-deps --wheel-dir dist dist/*.tar.gz; -$packenv/twine upload --skip-existing dist/*; +"$packenv"/python setup.py sdist; +"$packenv"/pip wheel --no-index --no-deps --wheel-dir dist dist/*.tar.gz; +"$packenv"/twine upload --skip-existing dist/*;