nonebot-plugin-discord-message-bridge


Namenonebot-plugin-discord-message-bridge JSON
Version 1.3.5 PyPI version JSON
download
home_pageNone
SummaryDiscord - QQ 消息转发插件
upload_time2024-08-20 14:22:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseGPL-3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![](https://socialify.git.ci/xxtg666/nonebot-plugin-discord-message-bridge/image?description=1&forks=1&issues=1&language=1&logo=https://raw.githubusercontent.com/xxtg666/nonebot-plugin-discord-message-bridge/master/docs/nbp_logo.png&name=1&owner=1&pulls=1&stargazers=1&theme=Light)

<div align="center">

<a href="./LICENSE">
    <img src="https://img.shields.io/github/license/xxtg666/nonebot-plugin-discord-message-bridge.svg?style=for-the-badge" alt="license">
</a>

<a href="https://pypi.python.org/pypi/nonebot-plugin-discord-message-bridge">
    <img src="https://img.shields.io/pypi/v/nonebot-plugin-discord-message-bridge.svg?style=for-the-badge" alt="pypi">
</a>

<img src="https://img.shields.io/badge/python-3.9+-blue.svg?style=for-the-badge" alt="python">

<a href="https://github.com/psf/black">
    <img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge" alt="Code style: black">
</a>

</div>

## 📖 介绍

将 QQ 与 Discord 的消息互通,并支持转发**图片**、**回复**、**提及(@)**

## 💿 安装

### 先决条件

在安装之前,请确保您的环境符合以下条件:

1. 拥有一个能够运行的 Python,版本在 3.9 及以上(本插件部分版本可能需要 3.12)
2. 已经安装并配置好 pip 等任意一款 Python3 包管理器
3. 已经创建或拥有了一个 NoneBot2 机器人项目

### 安装

<details>
<summary>通过文件安装</summary>

1. 在您的 pyproject.toml 中配置一个插件目录
```toml
plugin_dirs = ["src/plugins"]
```
> 您需要确保此目录存在,下文将使用 `插件目录` 代指此目录。
2. [下载本仓库](https://github.com/xxtg666/nonebot-plugin-discord-message-bridge/archive/refs/heads/main.zip)
3. 将 `nonebot-plugin-discord-message-bridge-main` 文件夹中的 `nonebot_plugin_discord_message_bridge` 文件夹解压到插件目录
4. 安装依赖
> 进入 `requirements.txt` 同目录下执行
```bash
pip install -r requirements.txt
```

</details>

<details>
<summary>通过 PIP 安装</summary>
    
1. 使用 pip 安装插件
```bash
pip install nonebot-plugin-discord-message-bridge
```
2. 修改 `pyproject.toml` 在 `plugins` 中添加 `nonebot_plugin_discord_message_bridge`

</details>

## ⚙️ 配置

请修改在机器人目录中创建一个 `.env` 文件(或编辑对应 `.env` 文件,可能为 `.env.dev` 或 `.env.prod`),并参考 [🔗config.py](https://github.com/xxtg666/nonebot-plugin-discord-message-bridge/blob/main/src/nonebot_plugin_discord_message_bridge/config.py) 的内容进行修改

- 需要 [🔗创建一个 Discord Bot](https://discord.com/developers/applications) 并邀请进入服务器中,用于接收消息
- 需要在 Discord 的 「服务器设置 → 整合」 内为需要转发的频道创建一个 Webhook ,并填入配置文件中,用于发送 QQ 内的消息


## 🎉 使用

- 在 QQ 群内收到一条消息时会启动 Discord 接收端,转发即可正常使用
- 用户在 Discord 内发送绑定命令 (默认为 `~`) 后可转发提及(@)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nonebot-plugin-discord-message-bridge",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "xxtg666 <xxtg666@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/10/84/0a3b2171da0f12b934709aa9352336fdaece3d05f29e926898c1a9d967b4/nonebot_plugin_discord_message_bridge-1.3.5.tar.gz",
    "platform": null,
    "description": "![](https://socialify.git.ci/xxtg666/nonebot-plugin-discord-message-bridge/image?description=1&forks=1&issues=1&language=1&logo=https://raw.githubusercontent.com/xxtg666/nonebot-plugin-discord-message-bridge/master/docs/nbp_logo.png&name=1&owner=1&pulls=1&stargazers=1&theme=Light)\n\n<div align=\"center\">\n\n<a href=\"./LICENSE\">\n    <img src=\"https://img.shields.io/github/license/xxtg666/nonebot-plugin-discord-message-bridge.svg?style=for-the-badge\" alt=\"license\">\n</a>\n\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-discord-message-bridge\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-discord-message-bridge.svg?style=for-the-badge\" alt=\"pypi\">\n</a>\n\n<img src=\"https://img.shields.io/badge/python-3.9+-blue.svg?style=for-the-badge\" alt=\"python\">\n\n<a href=\"https://github.com/psf/black\">\n    <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge\" alt=\"Code style: black\">\n</a>\n\n</div>\n\n## \ud83d\udcd6 \u4ecb\u7ecd\n\n\u5c06 QQ \u4e0e Discord \u7684\u6d88\u606f\u4e92\u901a\uff0c\u5e76\u652f\u6301\u8f6c\u53d1**\u56fe\u7247**\u3001**\u56de\u590d**\u3001**\u63d0\u53ca(@)**\n\n## \ud83d\udcbf \u5b89\u88c5\n\n### \u5148\u51b3\u6761\u4ef6\n\n\u5728\u5b89\u88c5\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u73af\u5883\u7b26\u5408\u4ee5\u4e0b\u6761\u4ef6\uff1a\n\n1. \u62e5\u6709\u4e00\u4e2a\u80fd\u591f\u8fd0\u884c\u7684 Python\uff0c\u7248\u672c\u5728 3.9 \u53ca\u4ee5\u4e0a\uff08\u672c\u63d2\u4ef6\u90e8\u5206\u7248\u672c\u53ef\u80fd\u9700\u8981 3.12\uff09\n2. \u5df2\u7ecf\u5b89\u88c5\u5e76\u914d\u7f6e\u597d pip \u7b49\u4efb\u610f\u4e00\u6b3e Python3 \u5305\u7ba1\u7406\u5668\n3. \u5df2\u7ecf\u521b\u5efa\u6216\u62e5\u6709\u4e86\u4e00\u4e2a NoneBot2 \u673a\u5668\u4eba\u9879\u76ee\n\n### \u5b89\u88c5\n\n<details>\n<summary>\u901a\u8fc7\u6587\u4ef6\u5b89\u88c5</summary>\n\n1. \u5728\u60a8\u7684 pyproject.toml \u4e2d\u914d\u7f6e\u4e00\u4e2a\u63d2\u4ef6\u76ee\u5f55\n```toml\nplugin_dirs = [\"src/plugins\"]\n```\n> \u60a8\u9700\u8981\u786e\u4fdd\u6b64\u76ee\u5f55\u5b58\u5728\uff0c\u4e0b\u6587\u5c06\u4f7f\u7528 `\u63d2\u4ef6\u76ee\u5f55` \u4ee3\u6307\u6b64\u76ee\u5f55\u3002\n2. [\u4e0b\u8f7d\u672c\u4ed3\u5e93](https://github.com/xxtg666/nonebot-plugin-discord-message-bridge/archive/refs/heads/main.zip)\n3. \u5c06 `nonebot-plugin-discord-message-bridge-main` \u6587\u4ef6\u5939\u4e2d\u7684 `nonebot_plugin_discord_message_bridge` \u6587\u4ef6\u5939\u89e3\u538b\u5230\u63d2\u4ef6\u76ee\u5f55\n4. \u5b89\u88c5\u4f9d\u8d56\n> \u8fdb\u5165 `requirements.txt` \u540c\u76ee\u5f55\u4e0b\u6267\u884c\n```bash\npip install -r requirements.txt\n```\n\n</details>\n\n<details>\n<summary>\u901a\u8fc7 PIP \u5b89\u88c5</summary>\n    \n1. \u4f7f\u7528 pip \u5b89\u88c5\u63d2\u4ef6\n```bash\npip install nonebot-plugin-discord-message-bridge\n```\n2. \u4fee\u6539 `pyproject.toml` \u5728 `plugins` \u4e2d\u6dfb\u52a0 `nonebot_plugin_discord_message_bridge`\n\n</details>\n\n## \u2699\ufe0f \u914d\u7f6e\n\n\u8bf7\u4fee\u6539\u5728\u673a\u5668\u4eba\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a `.env` \u6587\u4ef6\uff08\u6216\u7f16\u8f91\u5bf9\u5e94 `.env` \u6587\u4ef6\uff0c\u53ef\u80fd\u4e3a `.env.dev` \u6216 `.env.prod`\uff09\uff0c\u5e76\u53c2\u8003 [\ud83d\udd17config.py](https://github.com/xxtg666/nonebot-plugin-discord-message-bridge/blob/main/src/nonebot_plugin_discord_message_bridge/config.py) \u7684\u5185\u5bb9\u8fdb\u884c\u4fee\u6539\n\n- \u9700\u8981 [\ud83d\udd17\u521b\u5efa\u4e00\u4e2a Discord Bot](https://discord.com/developers/applications) \u5e76\u9080\u8bf7\u8fdb\u5165\u670d\u52a1\u5668\u4e2d\uff0c\u7528\u4e8e\u63a5\u6536\u6d88\u606f\n- \u9700\u8981\u5728 Discord \u7684 \u300c\u670d\u52a1\u5668\u8bbe\u7f6e \u2192 \u6574\u5408\u300d \u5185\u4e3a\u9700\u8981\u8f6c\u53d1\u7684\u9891\u9053\u521b\u5efa\u4e00\u4e2a Webhook \uff0c\u5e76\u586b\u5165\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u7528\u4e8e\u53d1\u9001 QQ \u5185\u7684\u6d88\u606f\n\n\n## \ud83c\udf89 \u4f7f\u7528\n\n- \u5728 QQ \u7fa4\u5185\u6536\u5230\u4e00\u6761\u6d88\u606f\u65f6\u4f1a\u542f\u52a8 Discord \u63a5\u6536\u7aef\uff0c\u8f6c\u53d1\u5373\u53ef\u6b63\u5e38\u4f7f\u7528\n- \u7528\u6237\u5728 Discord \u5185\u53d1\u9001\u7ed1\u5b9a\u547d\u4ee4 (\u9ed8\u8ba4\u4e3a `~`) \u540e\u53ef\u8f6c\u53d1\u63d0\u53ca(@)\n",
    "bugtrack_url": null,
    "license": "GPL-3",
    "summary": "Discord - QQ \u6d88\u606f\u8f6c\u53d1\u63d2\u4ef6",
    "version": "1.3.5",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2995c905efd708dcf0a5be71d6795042e0bca30c945a69d50e6411ea26769875",
                "md5": "721acc5ea807973ea3a729b2a63ce50d",
                "sha256": "54cb21a870541ac43f83033d18567da339d1c3be2cb31c75cb9cf4d7dea40224"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_discord_message_bridge-1.3.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "721acc5ea807973ea3a729b2a63ce50d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 26682,
            "upload_time": "2024-08-20T14:22:28",
            "upload_time_iso_8601": "2024-08-20T14:22:28.194922Z",
            "url": "https://files.pythonhosted.org/packages/29/95/c905efd708dcf0a5be71d6795042e0bca30c945a69d50e6411ea26769875/nonebot_plugin_discord_message_bridge-1.3.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10840a3b2171da0f12b934709aa9352336fdaece3d05f29e926898c1a9d967b4",
                "md5": "7062f089029d641da229e654f8881d17",
                "sha256": "da8c74d269732dd5b7b953b2debd4b2a65862be826a06442a13838a3c0a346c0"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_discord_message_bridge-1.3.5.tar.gz",
            "has_sig": false,
            "md5_digest": "7062f089029d641da229e654f8881d17",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 24752,
            "upload_time": "2024-08-20T14:22:29",
            "upload_time_iso_8601": "2024-08-20T14:22:29.094881Z",
            "url": "https://files.pythonhosted.org/packages/10/84/0a3b2171da0f12b934709aa9352336fdaece3d05f29e926898c1a9d967b4/nonebot_plugin_discord_message_bridge-1.3.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-20 14:22:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nonebot-plugin-discord-message-bridge"
}
        
Elapsed time: 0.94261s