Skip to content

Commit

Permalink
🐛 version 0.19.2
Browse files Browse the repository at this point in the history
fix Dispatcher
  • Loading branch information
RF-Tar-Railt committed Sep 14, 2024
1 parent 74a157a commit e2ecfd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
6 changes: 4 additions & 2 deletions arclet/alconna/avilla/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from arclet.alconna.stub import ArgsStub, OptionStub, SubcommandStub
from arclet.alconna.tools import AlconnaFormat
from avilla.core import Context, Message, Notice, Selector
from avilla.core.exceptions import UnknownTarget
from avilla.standard.core.message import MessageReceived
from creart import it
from graia.amnesia.message import MessageChain
Expand Down Expand Up @@ -69,7 +70,8 @@ def __init__(self, command: Alconna, otype: str, text: str, source: Dispatchable

class Dispatcher(BaseDispatcher):

async def catch(self, interface: "DispatcherInterface[AlconnaOutputMessage]"):
@classmethod
async def catch(cls, interface: "DispatcherInterface[AlconnaOutputMessage]"):
if interface.name == "output" and interface.annotation == str:
return interface.event.output
if interface.name in ("otype", "output_type", "type"):
Expand Down Expand Up @@ -114,7 +116,7 @@ async def reply_merge(self, message: MessageChain, source: MessageReceived):
if not (origin := reply_cache.get(source_id)):
try:
origin = await source.context.pull(Message, source.message.reply)
except NotImplementedError:
except (NotImplementedError, UnknownTarget, RuntimeError):
return message
else:
reply_cache[source_id] = origin
Expand Down
8 changes: 1 addition & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "pdm.backend"

[project]
name = "arclet-alconna-avilla"
version = "0.19.1"
version = "0.19.2"
description = "Support Alconna for GraiaProject/Avilla"
authors = [
{name = "RF-Tar-Railt", email = "[email protected]"},
Expand All @@ -28,7 +28,6 @@ license = {text = "AGPL-3.0"}
[project.entry-points."creart.creators"]
alconna_avilla_behavior = "arclet.alconna.avilla.create:AlconnaBehaviorCreator"


[tool]
[tool.pdm]
[tool.pdm.build]
Expand All @@ -41,11 +40,6 @@ dev = [
"avilla-onebot-v11>=1.0.0a28",
]

[tool.pdm.scripts]
pre_build = {call = "script:pre_build"}
post_build = {call = "script:post_build"}


[tool.black]
line-length = 120
target-version = ["py39", "py310", "py311", "py312"]
Expand Down
14 changes: 0 additions & 14 deletions script.py

This file was deleted.

0 comments on commit e2ecfd8

Please sign in to comment.