mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 16:16:21 +08:00
24 lines
538 B
Plaintext
24 lines
538 B
Plaintext
---
|
|
sidebar_position: 6
|
|
description: 简单插件示例
|
|
---
|
|
|
|
import CodeBlock from "@theme/CodeBlock";
|
|
import Messenger from "@site/src/components/Messenger";
|
|
|
|
# 插件示例
|
|
|
|
## 命令式问答示例
|
|
|
|
import WeatherSource from "!!raw-loader!../../../../tests/examples/weather.py";
|
|
|
|
<CodeBlock className="language-python">{WeatherSource}</CodeBlock>
|
|
|
|
<Messenger />
|
|
|
|
### 测试示例
|
|
|
|
import WeatherTest from "!!raw-loader!../../../../tests/test_examples/test_weather.py";
|
|
|
|
<CodeBlock className="language-python">{WeatherTest}</CodeBlock>
|