Skip to main content

适用于 Nonebot2 的用户插件

Project description

nonebot

NoneBot Plugin User

✨ NoneBot 用户插件 ✨

license pypi python QQ Chat Group

简介

使用方式

加载插件后发送 /user/bind

插件适配

先在插件代码最前面声明依赖

from nonebot import require
require("nonebot_plugin_user")

获取用户信息

from nonebot_plugin_user import User

@matcher.handle()
async def _(user: User):
    print(user.id)

获取用户会话信息

from nonebot_plugin_user import UserSession

@matcher.handle()
async def _(session: UserSession):
    print(session.user_id)

配置项

配置方式:直接在 NoneBot 全局配置文件中添加以下配置项即可。

计划

  • 支持权限

鸣谢

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_user-0.0.5.tar.gz (8.2 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_user-0.0.5-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page