Skip to content

Commit

Permalink
✨ version 0.54.2
Browse files Browse the repository at this point in the history
DI for options.value
  • Loading branch information
RF-Tar-Railt committed Dec 31, 2024
1 parent 1854d2d commit 56277cd
Show file tree
Hide file tree
Showing 6 changed files with 295 additions and 158 deletions.
9 changes: 5 additions & 4 deletions example/bot.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import nonebot
from nonebot.adapters.satori import Adapter as SatoriAdapter
from nonebot.adapters.onebot.v11 import Adapter as ONEBOT_V11Adapter

# from nonebot.adapters.satori import Adapter as SatoriAdapter

# from nonebot.adapters.onebot.v11 import Adapter as ONEBOT_V11Adapter

nonebot.init()

driver = nonebot.get_driver()
# driver.register_adapter(ONEBOT_V11Adapter)
driver.register_adapter(SatoriAdapter)
driver.register_adapter(ONEBOT_V11Adapter)
# driver.register_adapter(SatoriAdapter)

# nonebot.require("nonebot_plugin_alconna")
nonebot.load_plugins("plugins")
Expand Down
4 changes: 2 additions & 2 deletions example/plugins/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,8 @@ def wrapper(slot: Union[int, str], content: Union[str, None], context):


@setu.handle()
async def setu_h(count: int, tags: Match[tuple[str, ...]]):
await setu.send(f"数量: {count}\n标签: {tags.result}")
async def setu_h(count: int, tags: Match[tuple[str, ...]], r18: bool):
await setu.send(f"数量: {count}\n标签: {tags.result}\nR18: {r18}")


from nonebot_plugin_alconna.builtins.extensions.reply import ReplyMergeExtension
Expand Down
Loading

0 comments on commit 56277cd

Please sign in to comment.