semvec/pypi-packages huggingface dataset:
nonebot-plugin-auto-bot-selector 0.2.1
自动Bot选择器，消息推送好帮手
License: MIT
Requires Python: >=3.8

# nonebot-plugin-auto-bot-selector

## 使用

```python
from nonebot import on_message
from nonebot.exception import ActionFailed
from nonebot_plugin_alconna.uniseg import Target, UniMessage
from nonebot_plugin_auto_bot_selector import get_bots
from nonebot_plugin_auto_bot_selector.expection import NoBotFoundError
from nonebot_plugin_auto_bot_selector.target import PlatformTarget, TargetQQGroup
from nonebot_plugin_auto_bot_selector.utils.alconna import create_target, extract_target

foo = on_message()


@foo.handle()
async def _recive_target(alc_target: Target):
    # 使用 alconna 提取目标
    abs_target = extract_target(alc_target)
    # 手动创建目标
    qq_group = TargetQQGroup(group_id=123456)
    # do something
    await foo.finish(f"用户 {abs_target} 已保存")


async def _send_msg_to_target(abs_target: PlatformTarget, msg: UniMessage):
    alc_target = create_target(abs_target)
    try:
        bots = get_bots(abs_target)
    except NoBotFoundError:
        return "没有可用的推送 Bot"

    for bot in get_bots(abs_target):
        try:
            await msg.send(target=alc_target, bot=bot)
            return "发送成功"
        except ActionFailed:
            # 发送失败
            continue
    else:
        return "全部推送 Bot 发送失败"
```
pyanglianwater-URL 0.1.0
Your project description here
License: MIT
Requires Python: <4,>=3.8

<div align="center">

# pyanglianwater

A module to interact with Anglian Water and retrieve smart meter usage.

[![Build Status](https://github.com/pantherale0/pyanglianwater/workflows/build/badge.svg)](https://github.com/pantherale0/pyanglianwater/actions)
[![Coverage Status](https://coveralls.io/repos/github/pantherale0/pyanglianwater/badge.svg?branch=main)](https://coveralls.io/github/pantherale0/pyanglianwater?branch=main)
[![PyPi](https://img.shields.io/pypi/v/pyanglianwater)](https://pypi.org/project/pyanglianwater)
[![Licence](https://img.shields.io/github/license/pantherale0/pyanglianwater)](LICENSE)

<img src="https://raw.githubusercontent.com/justintime50/assets/main/src/python-template/showcase.png" alt="Showcase">

</div>

## Install

```bash
# Install tool
pip3 install pyanglianwater

# Install locally
just install
```

## Usage

TODO

## Development

```bash
# Get a comprehensive list of development tools
just --list
```