GenshinDot for Python, powered by Graia-Ariadne.
Project description
AGenshinDot
AGenshinDot 是 GenshinDot 的 Python 实现,由 Graia-Ariadne 驱动.
声明
AGenshinDot 遵循 AGPLv3 许可协议开放全部源代码,你可在这里找到本项目的许可证.
AGenshinDot 仅供学习娱乐使用,禁止将此 Bot 用于商用和非法用途.
AGenshinDot 项目及作者不对因使用本项目所造成的损失进行赔偿,也不承担任何法律责任.
安装
从 PyPI 安装
pip install agenshindot
# or
poetry add agenshindot
从 GitHub 安装
1.直接安装
poetry add git+https://github.com/MingxuanGame/AGenshinDot.git
2.克隆后安装
git clone https://github.com/MingxuanGame/AGenshinDot.git
cd AGenshinDot
poetry install --no-dev
配置
所有配置均保存在运行目录 config.toml.
下面为配置样例:
# 机器人 QQ 号
account = 1185285105
# verifyKey
verify_key = "agenshindot"
# 是否启用控制台
enable_console = false
# 是否开启 Cookie 绑定
enable_bind_cookie = false
# 机器人管理员 QQ 号
admins = [1060148379]
# 以下为连接配置
# 如果不配置则默认为 HTTP + 正向 WebSocket,连接地址为 localhost:8080
# 可以同时配置多种连接
# 正向 WebSocket 配置
ws = "ws://localhost:8080"
# 等同于如下配置
# ws = ["ws://localhost:8080"]
# HTTP 配置
http = "http://localhost:8080"
# 等同于如下配置
# http = ["http://localhost:8080"]
# 反向 WebSocket 配置
[ws_reverse]
# Endpoint
path = "/"
# 验证的参数
params = {}
# 验证的请求头
headers = {}
# WARNING 上面的配置要保证不能缺失,也不能调换位置
# 如果只需要设置 Endpoint,也可以使用下方的配置
# ws_reverse = "/"
# HTTP Webhook 配置
[webhook]
# Endpoint
path = "/"
# 验证的请求头
headers = {}
# WARNING 上面的配置要保证不能缺失,也不能调换位置
# 如果只需要设置 Endpoint,也可以使用下方的配置
# webhook = "/"
# 日志配置
[log]
# 日志等级,详情请看 loguru 文档
level = "INFO"
# 过期时间,过期的日志将被删除,格式请看
# https://pydantic-docs.helpmanual.io/usage/types/#datetime-types
# 中 `timedelta` 部分
expire_time = "P14DT0H0M0S"
# 是否启用数据库日志
db_log = false
启动
1.执行本项目文件夹下的 bot.py
python bot.py
2.以模块形式启动
python -m agenshindot
控制台命令
WARNING 控制台属于实验性内容,不建议使用
启用控制台后,会禁用标准输出中 日志等级 的设置
在启用控制台后,可以输入以下命令执行一些操作
-
/stop关闭 AGenshinDot.
-
/license输出许可证信息.
-
/version输出 AGenshinDot LOGO 和版本信息.
-
/execute <SQL 语句>执行 SQL 语句 (危险操作)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agenshindot-0.2.0.tar.gz.
File metadata
- Download URL: agenshindot-0.2.0.tar.gz
- Upload date:
- Size: 4.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
867c472fbb4421a728065a925faddb3da97050728ab86ad392c99b01f52242a5
|
|
| MD5 |
6aae4c8ca67106bbba87bb3daf29b9a0
|
|
| BLAKE2b-256 |
ecbba0a9652abc20d53c7d2bffbb0e27e771a710e9169aa08ade74fba02704ff
|
File details
Details for the file agenshindot-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agenshindot-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9c7f05d8ec2a6fc9e9338bcc18b26bff791cc367318002ecc9d66a483b90dbc
|
|
| MD5 |
dc07fa96194e98a431a98b2fc9b04d61
|
|
| BLAKE2b-256 |
d5bfefb7cc762696fd5ae90fc66164eb565c75ad6655168d95874d5abd991a19
|