NoneBot2 plugin for twitter
Project description
📖 介绍
订阅推送 twitter 推文
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-twitter
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-twitter
pdm
pdm add nonebot-plugin-twitter
poetry
poetry add nonebot-plugin-twitter
conda
conda install nonebot-plugin-twitter
打开 nonebot2 项目根目录下的 pyproject.toml
文件, 在 [tool.nonebot]
部分追加写入
plugins = ["nonebot_plugin_twitter"]
⚙️ 配置
申请 twitter api 权限
生成 Bearer Token
在 nonebot2 项目的.env
文件中添加下表中的必填配置
配置项 | 必填 | 默认值 | 说明 |
---|---|---|---|
bearer_token | 是 | 无 | api token |
twitter_proxy | 否 | 无 | proxy |
command_priority | 否 | 10 | 命令优先级 |
🎉 使用
指令表
指令 | 权限 | 需要@ | 范围 | 说明 |
---|---|---|---|---|
关注推主 | 无 | 否 | 群聊/私聊 | 关注,指令格式:“关注推主 <推主id> [r18]” r18为可选参数,不开启和默认为不推送r18推文 |
取关推主 | 无 | 否 | 群聊/私聊 | 取关切割 |
推主列表 | 无 | 否 | 群聊/私聊 | 展示列表 |
推特推送关闭 | 群管 | 否 | 群聊/私聊 | 关闭推送 |
推特推送开启 | 群管 | 否 | 群聊/私聊 | 开启推送 |
注意事项
1.消息为合并转发发送,存在延迟和发送失败的可能
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
Close
Hashes for nonebot-plugin-twitter-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb30f1bd2507d9557f2ec88030d13bbd39223ec953117e0c094f0e1dcfbfca43 |
|
MD5 | 4d859c086994024bbba08887aac7d32d |
|
BLAKE2b-256 | 62200798fde0ec359f40c856b2764e77cbf39356f6d3e8a0096aa93b9eb1f079 |
Close
Hashes for nonebot_plugin_twitter-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d36e05260fe79191a11c42d7c7c706d15a77edaf623a8657da02d33931c68248 |
|
MD5 | 30644d08bb0f76066458a03fc7f5ecc9 |
|
BLAKE2b-256 | f3a91b01bb0a8c30e8f626878859fba1fee2666a4f73bbd8f6c449f104d1f71b |