Merge pull request 'v4.0.1' (#170) from dev into main
Reviewed-on: #170
This commit is contained in:
commit
bfcb067ba5
@ -15,7 +15,7 @@ jobs:
|
|||||||
container: catthehacker/ubuntu:act-latest
|
container: catthehacker/ubuntu:act-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
python-version: [ "3.11", "3.12", "3.13" ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
22
README.md
22
README.md
@ -36,18 +36,17 @@ pip install libbot[pycord,speed]
|
|||||||
### Pyrogram
|
### Pyrogram
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from libbot.pyrogram import PyroClient
|
from libbot.pyrogram.classes import PyroClient
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
client = PyroClient(scheduler=scheduler)
|
client: PyroClient = PyroClient()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client.run()
|
client.run()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("Shutting down...")
|
print("Shutting down...")
|
||||||
finally:
|
finally:
|
||||||
if client.scheduler is not None:
|
|
||||||
client.scheduler.shutdown()
|
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
|
||||||
@ -59,20 +58,20 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
from discord import Intents
|
from discord import Intents
|
||||||
from libbot import sync
|
from libbot.utils import config_get
|
||||||
from libbot.pycord import PycordBot
|
from libbot.pycord.classes import PycordBot
|
||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
intents = Intents.default()
|
intents: Intents = Intents.default()
|
||||||
bot = PycordBot(intents=intents)
|
bot: PycordBot = PycordBot(intents=intents)
|
||||||
|
|
||||||
bot.load_extension("cogs")
|
bot.load_extension("cogs")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await bot.start(sync.config_get("bot_token", "bot"))
|
await bot.start(config_get("bot_token", "bot"))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logger.warning("Shutting down...")
|
print("Shutting down...")
|
||||||
await bot.close()
|
await bot.close()
|
||||||
|
|
||||||
|
|
||||||
@ -83,4 +82,5 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
## Config examples
|
## Config examples
|
||||||
|
|
||||||
For bot config examples please check the examples directory. Without a valid config file, the bot won't start at all, so you need to make sure the correct config file is used.
|
For bot config examples please check the examples directory. Without a valid config file, the bot won't start at all, so
|
||||||
|
you need to make sure the correct config file is used.
|
||||||
|
@ -1 +1,2 @@
|
|||||||
aiofiles>=23.0.0
|
aiofiles>=23.0.0
|
||||||
|
typing_extensions~=4.12.2
|
@ -7,5 +7,6 @@ pytest-asyncio==0.25.0
|
|||||||
pytest-cov==6.0.0
|
pytest-cov==6.0.0
|
||||||
pytest==8.3.4
|
pytest==8.3.4
|
||||||
tox==4.23.2
|
tox==4.23.2
|
||||||
|
twine==6.0.1
|
||||||
types-aiofiles==24.1.0.20241221
|
types-aiofiles==24.1.0.20241221
|
||||||
types-ujson==5.10.0.20240515
|
types-ujson==5.10.0.20240515
|
@ -1,4 +1,4 @@
|
|||||||
__version__ = "4.0.0"
|
__version__ = "4.0.1"
|
||||||
__license__ = "GPL3"
|
__license__ = "GPL3"
|
||||||
__author__ = "Profitroll"
|
__author__ = "Profitroll"
|
||||||
|
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
# This file is left empty on purpose
|
||||||
|
# Adding imports here will cause import errors when libbot[pycord] is not installed
|
@ -0,0 +1,2 @@
|
|||||||
|
# This file is left empty on purpose
|
||||||
|
# Adding imports here will cause import errors when libbot[pyrogram] is not installed
|
Loading…
Reference in New Issue
Block a user