From 9df78bd231961a85efb8f358b82db17d033bb9f3 Mon Sep 17 00:00:00 2001 From: Stark Bots <88478059+StarkBotsIndustries@users.noreply.github.com> Date: Thu, 7 Apr 2022 07:53:33 +0530 Subject: [PATCH] v1.0.2 https://pystark.codes/meta/changelog/#v1.0.2 --- boilerplate/.env | 10 +++--- boilerplate/README.md | 4 +-- boilerplate/bot.py | 3 +- boilerplate/requirements.txt | 2 +- boilerplate/settings.py | 49 ++++++++++++++++++-------- boilerplate_starkbots/bot.py | 3 +- boilerplate_starkbots/requirements.txt | 2 +- docs/introduction/quickstart.md | 4 +-- docs/meta/changelog.md | 14 ++++++-- pystark/constants.py | 2 +- setup.py | 5 +-- 11 files changed, 60 insertions(+), 38 deletions(-) diff --git a/boilerplate/.env b/boilerplate/.env index ad9c111..d16b5a7 100644 --- a/boilerplate/.env +++ b/boilerplate/.env @@ -1,9 +1,9 @@ # Only for deploying locally, else delete this file -API_ID = -API_HASH = -BOT_TOKEN = -OWNER_ID = +API_ID= +API_HASH= +BOT_TOKEN= +OWNER_ID= # non-mandatory -SUDO_USERS = +SUDO_USERS= diff --git a/boilerplate/README.md b/boilerplate/README.md index f223f3b..a18a974 100644 --- a/boilerplate/README.md +++ b/boilerplate/README.md @@ -1,6 +1,6 @@ -## By [@StarkBots](https://t.me/StarkBots) +## PyStark Bot -Click on this button, when the code is in your GitHub repository. +Click on below button, when the code is in your GitHub repository. [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) diff --git a/boilerplate/bot.py b/boilerplate/bot.py index aab2486..d71ee05 100644 --- a/boilerplate/bot.py +++ b/boilerplate/bot.py @@ -1,5 +1,4 @@ from pystark import Stark -if __name__ == "__main__": - Stark().activate() +Stark().activate() diff --git a/boilerplate/requirements.txt b/boilerplate/requirements.txt index 6467873..5ca6292 100644 --- a/boilerplate/requirements.txt +++ b/boilerplate/requirements.txt @@ -1 +1 @@ -PyStark==1.0.0 +PyStark>=1.0.0 diff --git a/boilerplate/settings.py b/boilerplate/settings.py index 2aeea76..8e9de2d 100644 --- a/boilerplate/settings.py +++ b/boilerplate/settings.py @@ -1,15 +1,20 @@ # Project Configuration +# See https://pystark.codes/start/settings for details -START = "You started the bot" # Start Message -HELP = "Only you can help yourself" # Help Message +# Path of the 'plugins' directory in relation to the root directory or List of multiple paths +# If name of your directory is 'files' and it is in the same folder as 'bot.py', pass plugin='files'. +# Defaults to 'plugins', i.e, a folder named 'plugins' in same directory as 'bot.py' +PLUGINS = "plugins" or ["plugins"] -ABOUT = "About This Awesome Bot \nDeveloped using @PyStark" # About Message +# Set bot menu using command description if provided +SET_BOT_MENU = True -PLUGINS = "plugins" or ["plugins"] # Path to plugins directory or List of multiple paths - -ADDONS = [ # The addons (default plugins) you want to load from pystark +# Prefixes for commands. For multiple prefixes, specify multiple together like ["&", "*", "/", "."] +CMD_PREFIXES = ["/"] +# The addons (default plugins) you want to load from pystark +ADDONS = [ "start", # /start command which replies with text in START variable. Only private chats "help", # /help command which replies with text in HELP variable. Only private chats "about", # /about command which replies with text in ABOUT variable. Only private chats @@ -20,18 +25,32 @@ # "bans", # Use /ban to ban people from using the bot. /unban to unban. /banlist to see banned users. Needs postgresql database with table "bans" # "broadcast", # Use /broadcast to broadcast a message to users. Needs postgresql database with table "users" # "stats", # Use /stats to get current user stats. Needs postgresql database with table "users" - ] -MUST_JOIN = [] # List of usernames or chat ids where users must join +# List of usernames or chat ids where users must join. Only needed if 'must_join' addon is enabled. +MUST_JOIN = [] + +# Specify timezone for logging. Defaults to India (Asia/Kolkata). Full list at https://gist.github.com/StarkBotsIndustries/7a6210355f40052a71ba96032d4638df +TIMEZONE = "Asia/Kolkata" -SET_BOT_MENU = True # Set bot menu using command descriptions +# Only if postgresql database is used +DATABASE_TABLES = [ + # "users", # Needed for "stats" addon and "broadcast" addon + # "bans", # Needed for "bans" addon +] -CMD_PREFIXES = ["/"] # Prefixes for commands. For multiple prefixes, specify multiple together like ["&", "*", "/", "."] +# Start Message. Message sent at /start command. Only needed if `start` addon is enabled +START = "Thank you for starting this bot." -TIMEZONE = "Asia/Kolkata" # Specify timezone for logging. Defaults to India (Asia/Kolkata) +# Help Message. Message sent at /help command. Only needed if `help` addon is enabled +HELP = """ +Available Commands -DATABASE_TABLES = [ # Use them only if postgresql database is used - "users", # Needed for "stats" addon and "broadcast" addon - "bans", # Needed for "bans" addon -] +/start - Start the bot +/help - Show this message +/about - About the bot +/id - Get Telegram ID +""" + +# About Message. Message sent at /about command. Only needed if `about` addon is enabled +ABOUT = "About This Awesome Bot \nDeveloped using @PyStark" diff --git a/boilerplate_starkbots/bot.py b/boilerplate_starkbots/bot.py index aab2486..d71ee05 100644 --- a/boilerplate_starkbots/bot.py +++ b/boilerplate_starkbots/bot.py @@ -1,5 +1,4 @@ from pystark import Stark -if __name__ == "__main__": - Stark().activate() +Stark().activate() diff --git a/boilerplate_starkbots/requirements.txt b/boilerplate_starkbots/requirements.txt index 6467873..5ca6292 100644 --- a/boilerplate_starkbots/requirements.txt +++ b/boilerplate_starkbots/requirements.txt @@ -1 +1 @@ -PyStark==1.0.0 +PyStark>=1.0.0 diff --git a/docs/introduction/quickstart.md b/docs/introduction/quickstart.md index cb46426..e9a1ea9 100644 --- a/docs/introduction/quickstart.md +++ b/docs/introduction/quickstart.md @@ -2,8 +2,8 @@ Following these steps will allow you to see **PyStark** in action as quickly as possible. -!!! note - Installation of Python with version 3.6 or above is required. +!!! important + Installation of Python with version 3.9 or above is required! --- diff --git a/docs/meta/changelog.md b/docs/meta/changelog.md index eaedf3c..ef671e7 100644 --- a/docs/meta/changelog.md +++ b/docs/meta/changelog.md @@ -1,11 +1,19 @@ -# Changelog +# ChangeLog -Latest Version: v1.0.1 +Latest Version: `v1.0.2` + +--- + + +### v1.0.2 - April 7, 2022 + +- Specify minimum python version which is `3.9`, in docs and pypi. +- More user-friendly boilerplate. --- -### v1.0.0 - April 6, 2022 +### v1.0.1 - April 7, 2022 - Fix broken CLI due to bad imports. - Add `dev-requirement.txt` for docs and pypi diff --git a/pystark/constants.py b/pystark/constants.py index 8430801..f7a66ec 100644 --- a/pystark/constants.py +++ b/pystark/constants.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with PyStark. If not, see . -__version__ = "1.0.1" +__version__ = "1.0.2" __description__ = "An add-on extension to Pyrogram for absolute beginners" __copyright__ = "Copyright (C) 2021-2022 Stark Bots " __license__ = "GNU General Public License v3 or later (GPLv3+)" diff --git a/setup.py b/setup.py index 0796b11..7bee728 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ def get_packages(): keywords=['telegram', 'bot', 'pyrogram', 'python', 'telegram-bot'], install_requires=install_requires, zip_safe=False, - python_requires=">=3.6", + python_requires=">=3.9", dependency_links=['https://github.com/pyrogram/pyrogram/tarball/master'], classifiers=[ 'Development Status :: 5 - Production/Stable', @@ -63,9 +63,6 @@ def get_packages(): 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11',