From 89cf4def54ff42e0a00aeed7c0a4db4e6cddc444 Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt Date: Sun, 10 Nov 2024 07:00:08 +0800 Subject: [PATCH] :bug: use Force(None) --- app/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/core.py b/app/core.py index 1437677..d32e5f8 100644 --- a/app/core.py +++ b/app/core.py @@ -9,6 +9,7 @@ from creart import it from graia.broadcast.entities.dispatcher import BaseDispatcher from graia.broadcast.exceptions import PropagationCancelled +from graia.broadcast.entities.signatures import Force from graia.broadcast.interfaces.dispatcher import DispatcherInterface from graia.saya import Saya from launart import Launart, Service @@ -139,7 +140,7 @@ def __init__(self, service: RaianBotService): self.service = service async def beforeExecution(self, interface: DispatcherInterface): - context: Context = await interface.lookup_param("context", Context, None) + context: Context = await interface.lookup_param("context", Context, Force(None)) if context: interface.local_storage["bot_config"] = next( (bot for bot in self.service.config.bots if bot.ensure(context.account)), None # type: ignore