console adapter for nonebot2
Project description
NoneBot-Adapter-Console
✨ Console 适配 ✨
配置
修改 NoneBot 配置文件 .env 或者 .env.*。
Driver
参考 driver 配置项,直接使用 None 驱动器:
DRIVER=~none
console_bot_id
配置 Bot 的 ID, 默认为 robot
console_bot_name
配置 Bot 的名称, 默认为 Bot
console_strict_tome
配置是否使用严格的 ToMe 规则。默认为 False。
启用后,在群聊中发送的消息需要增加 @{bot_id} 才能满足 ToMe 的条件。
示例
from nonebot import on_command
from nonebot.adapters.console import Bot
from nonebot.adapters.console.event import MessageEvent
from nonebot.adapters.console.message import MessageSegment
matcher = on_command("test")
@matcher.handle()
async def handle_receive(bot: Bot, event: MessageEvent):
await bot.send(event, MessageSegment.text("Hello, world!"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_adapter_console-0.10.0.tar.gz.
File metadata
- Download URL: nonebot_adapter_console-0.10.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.26.7 CPython/3.12.3 Linux/6.17.0-1008-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeb813038dd9e3403da5099d140b664582cb3d05471a2697ae27fe3e69843a47
|
|
| MD5 |
3f1aebee770f427f3dfb88f23144e504
|
|
| BLAKE2b-256 |
02e3abd2192ba5b7f839a3f3bebed70e333e69ad0ceb3ad8338928b4fe3064cb
|
File details
Details for the file nonebot_adapter_console-0.10.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_adapter_console-0.10.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.26.7 CPython/3.12.3 Linux/6.17.0-1008-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8a8817866ace0e0df08a8c5d3cde558302f4c4d5b7c1a7eaff0af191dcbf024
|
|
| MD5 |
f74467fd048b165fd4d263b7d668bc8a
|
|
| BLAKE2b-256 |
c51bc6e8452d4a4816230550d5b2e3aab8758fa2f652b33527f217852aa82910
|