nonebot2/website/docs/tutorial/plugin/example.mdx

24 lines
538 B
Plaintext
Raw Normal View History

2022-01-07 18:38:04 +08:00
---
sidebar_position: 6
description: 简单插件示例
---
import CodeBlock from "@theme/CodeBlock";
2022-01-07 21:03:03 +08:00
import Messenger from "@site/src/components/Messenger";
2022-01-07 18:38:04 +08:00
# 插件示例
## 命令式问答示例
import WeatherSource from "!!raw-loader!../../../../tests/examples/weather.py";
<CodeBlock className="language-python">{WeatherSource}</CodeBlock>
2022-01-07 21:03:03 +08:00
<Messenger />
2022-01-07 18:38:04 +08:00
### 测试示例
import WeatherTest from "!!raw-loader!../../../../tests/test_examples/test_weather.py";
<CodeBlock className="language-python">{WeatherTest}</CodeBlock>