22 lines
477 B
Python
22 lines
477 B
Python
import logging
|
|
|
|
from nio import AsyncClient
|
|
|
|
from ..utils import setup_logger
|
|
|
|
|
|
class _Plugin(object):
|
|
def __init__(self, bot: any, name: str) -> None:
|
|
self.__name = name
|
|
self.__bot = bot
|
|
self.__client = bot.client
|
|
self.__logger = setup_logger(f'{__package__}.{self.__name}')
|
|
|
|
@property
|
|
def logger(self) -> logging.Logger:
|
|
return self.__logger
|
|
|
|
@property
|
|
def client(self) -> AsyncClient:
|
|
return self.__client
|