Coder Social home page Coder Social logo

jystore-tultle's Introduction

JYstore-Tultle

简介

基于NoneBot的机器人

适配器使用:

已安装插件:

自制插件:

  • epicfree:获取 Epic Game 免费游戏
  • mutong_panel_api:控制木桶面板的翼龙面板api
  • recode_picture:记录发送过的图片,并返回图片的直链
  • sync_message_to_discord:在QQ频道和 Discord 之间同步消息

使用

本项目基于 nb-cli 脚手架运行,请先安装 nb-cli ,详见NoneBot 快速上手

下载项目

git clone https://github.com/Autuamn/JYstore-Tultle.git
cd JYstore-Tultle

安装依赖

本项目使用 poetry 管理依赖,请确保安装了 poetry

poetry install

创建配置文件

项目文件夹创建一个.env文件,并写入以下内容:

DRIVER=~aiohttp
QQ_BOTS='
[
  {
    "id": "xxx",
    "token": "xxx",
    "secret": "xxx",
    "intent": {
      "guild_messages": true,
      "at_messages": false,
      "direct_message": true
    }
  }
]
'
DISCORD_BOTS='
[
  {
    "token": "xxx",
    "intent": {
      "guild_messages": true,
      "direct_messages": true
    },
    "application_commands": {"*": ["*"]}
  }
]
'
kaiheila_bots =[{"token": "xxx"}]

如果无法直接访问 Discord 还需加上DISCORD_PROXY设置代理

更多详细参数请见各适配器的说明:QQKookDiscord

运行机器人

nb run

如何后台运行?

推荐使用 tmux 工具
Linux tmux 終端機管理工具使用教學

配置项

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

非自制插件的配置项请参考插件的主页

需要注意的是,本项目的自制插件使用本地数据存储存储数据。如需更改目录请在配置文件中加入

localstore_cache_dir=""   # 缓存目录
localstore_config_dir=""  # 配置目录
localstore_data_dir=""    # 数据目录

mutong_panel_api

  • mutong_panel_client_api

    mutong_panel_client_api=https://vat-panel.yunqiaold.com/api/client/servers/xxx

    翼龙面板 api 的链接,xxx为控制台网址的最后一段

    例如:
    服务器控制台的地址为https://vat-panel.yunqiaold.com/server/1a7ce997,则xxx就为1a7ce997

  • mutong_panel_api_key

    mutong_panel_api_key=xxx

    面板账户的 API 密钥,可在“账号设置(点击头像)- API 凭证”处获取

recode_picture

  • recode_picture_recode_file_url

    recode_picture_recode_file_url="http://114.514.19.19:810"

    QQ官方机器人不能发域名 url,只能用ip访问

  • recode_picture_enable_guild_id

    recode_picture_enable_guild_id=["123", "456"]

    控制启用的频道

  • recode_picture_enable_chinnel_id

    recode_picture_enable_chinnel_id=["123", "456"]

    控制启用的子频道

sync_message_to_discord

  • smd_unmatch_beginning

    smd_unmatch_beginning=["/", "!"]

    指明不转发的消息开头,默认为["/"]

  • smd_channel_bind

    smd_channel_links=[
        {
            qq_guild_id: "123132",
            dc_guild_id: 456456,
            qq_channel_id: "78789",
            dc_channel_id: 123123,
            webhook_id: 456456,
            webhook_token: "xxx"
        },
        {
            qq_guild_id: str    # QQ频道 id
            dc_guild_id: int    # Discord 服务器 id
            qq_channel_id: str  # QQ子频道 id
            dc_channel_id: int  # Discord 频道 id
            webhook_id: int     # WebHook id
            webhook_token: str  # WebHook token
                                # 请不要将注释放在此处!!
        }
    ]

    绑定QQ子频道和 Discode 频道,需要自行准备好 WebHook

More

NoneBot Docs

jystore-tultle's People

Contributors

autuamn avatar atlanttis avatar pre-commit-ci[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.