mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 12:51:35 +00:00
17 lines
417 B
Python
17 lines
417 B
Python
|
from telegram.ext import CallbackContext, ExtBot
|
||
|
|
||
|
from service import BaseService
|
||
|
|
||
|
|
||
|
class PaimonContext(CallbackContext[ExtBot, dict, dict, dict]):
|
||
|
"""
|
||
|
PaimoeContext 类
|
||
|
"""
|
||
|
|
||
|
@property
|
||
|
def service(self) -> BaseService:
|
||
|
value = self.bot_data.get("service")
|
||
|
if value is None:
|
||
|
raise RuntimeError("没有与此上下文对象关联的实例化服务")
|
||
|
return value
|