diff options
| author | Nakidai <nakidai@disroot.org> | 2024-11-05 15:25:26 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2024-11-05 15:25:26 +0300 |
| commit | 8311ace9df72d57ee6026de57b0063cf198d1ae5 (patch) | |
| tree | 408f6ba5d5e8afdb748c85f23ce74e44fda2cc2b | |
| parent | 104bf4e45123bd920532205803f49d9bddfca44a (diff) | |
| download | petthecord-8311ace9df72d57ee6026de57b0063cf198d1ae5.tar.gz petthecord-8311ace9df72d57ee6026de57b0063cf198d1ae5.zip | |
Edit code's interface
- Rename `Bot` from `petthecord.runner` to `PetTheCord` - Add all classes to the __init__.py
| -rw-r--r-- | src/petthecord/__init__.py | 8 | ||||
| -rw-r--r-- | src/petthecord/main.py | 4 | ||||
| -rw-r--r-- | src/petthecord/runner.py | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/petthecord/__init__.py b/src/petthecord/__init__.py index afd0ec5..65a78e9 100644 --- a/src/petthecord/__init__.py +++ b/src/petthecord/__init__.py @@ -1,4 +1,8 @@ -from .main import Bot, main +from .bot import PetTheCordCog +from .cache import CachedPet +from .main import main +from .runner import PetTheCord +from .server import Server -__all__ = ["main"] +__all__ = ["CachedPet", "main", "PetTheCord", "PetTheCordCog", "Server"] diff --git a/src/petthecord/main.py b/src/petthecord/main.py index 0b1d144..c164685 100644 --- a/src/petthecord/main.py +++ b/src/petthecord/main.py @@ -2,7 +2,7 @@ from argparse import ArgumentParser from os import getenv from sys import argv, stderr -from .runner import Bot +from .runner import PetTheCord def main() -> None: @@ -57,7 +57,7 @@ def main() -> None: ) args = parser.parse_args() - bot = Bot( + bot = PetTheCord( args.host, args.port, args.origin, diff --git a/src/petthecord/runner.py b/src/petthecord/runner.py index f43f148..f40577c 100644 --- a/src/petthecord/runner.py +++ b/src/petthecord/runner.py @@ -9,7 +9,7 @@ from .cache import CachedPet from .server import Server -class Bot(commands.Bot): +class PetTheCord(commands.Bot): def __init__( self, |