nonebot-plugin-l4d2-server 0.6.6__tar.gz → 1.0.0a2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nonebot_plugin_l4d2_server-0.6.6 → nonebot_plugin_l4d2_server-1.0.0a2}/PKG-INFO +57 -66
- {nonebot_plugin_l4d2_server-0.6.6 → nonebot_plugin_l4d2_server-1.0.0a2}/README.md +43 -45
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/__init__.py +45 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/__main__.py +140 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/config.py +35 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/data/font/loli.ttf +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_anne/__init__.py +124 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_anne/ranne.py +18 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/Help.json +102 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/__init__.py +57 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/draw.py +206 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//344/273/213/347/273/215.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//344/273/273/345/212/241.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//344/277/241/346/201/257.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/205/254/345/221/212.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/210/200/345/211/221.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/210/207/346/215/242.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/210/240/351/231/244.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/210/267/346/226/260.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/215/241/347/273/204.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/223/252/351/207/214.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/234/260/345/233/276.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/205/245.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/207/272.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//345/275/261.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/213/274/345/233/276.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/216/242/347/264/242.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/216/250/351/200/201.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/224/266/351/233/206.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/224/273/347/225/245.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/233/264/346/226/260.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/235/220/346/226/231.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/237/245/350/257/242.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/240/241/351/252/214.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/257/217/346/234/210.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/267/261/346/270/212.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/267/273/345/212/240.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//346/270/205/351/231/244.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//347/212/266/346/200/201.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//347/255/276/345/210/260.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//347/273/221/345/256/232.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//350/241/250.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//350/241/250/346/203/205.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//350/247/222/350/211/262.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//350/256/260/345/275/225.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//351/205/215/347/275/256.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/icon//351/207/215/345/220/257.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/texture2d/badge.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/texture2d/banner.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/texture2d/bg.jpg +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/texture2d/button.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_help/texture2d/icon.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/__init__.py +16 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/anne_pil.py +17 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/convert.py +175 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image}/download.py +11 -35
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/html_img.py +105 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/image_tools.py +468 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image/template → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/anne}/back.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/anne/back1.jpg +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img}/head/head.png +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img}/header/logo.png +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img}/header/player1.jpg +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.html +299 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/HYPixel11pxU-2.ttf +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.html +341 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.html +355 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/Tutumianhuatang-Bold-2.ttf +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/bilibili.svg +1 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/github.svg +1 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img}/template/l.svg +0 -1
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/m.svg +1 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/normal.html +247 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/vac.png +0 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/template/vac_white.png +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img}/template/w.svg +1 -1
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/model.py +15 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image}/vtfs.py +4 -2
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_request/__init__.py +143 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_request/draw_msg.py +83 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/utils/api/api.py +10 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/utils/api/models.py +137 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/utils/api/request.py +337 -0
- nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/utils/database/models.py +18 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_utils → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/utils}/utils.py +60 -63
- nonebot_plugin_l4d2_server-1.0.0a2/pyproject.toml +59 -0
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/__init__.py +0 -128
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image/template/help.html +0 -263
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image/template/help_dack.html +0 -231
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image/template/m.svg +0 -1
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/img/white.png +0 -0
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_anne/__init__.py +0 -95
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_anne/analysis.py +0 -54
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_anne/anne_telecom.py +0 -79
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_anne/server.py +0 -47
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_anne/startand.py +0 -17
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_anne/utils.py +0 -294
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_data/__init__.py +0 -105
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_data/config.py +0 -18
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_data/players.py +0 -100
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_data/serverip.py +0 -40
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_file/__init__.py +0 -222
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_file/ayromote.py +0 -64
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_file/input_json.py +0 -77
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_file/remote.py +0 -86
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_file/utils.py +0 -104
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_image/__init__.py +0 -125
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_image/htmlimg.py +0 -18
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_image/images.py +0 -92
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_image/one.py +0 -44
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_image/send_image_tool.py +0 -32
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_image/steam.py +0 -63
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_push/__init__.py +0 -225
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_queries/__init__.py +0 -326
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_queries/himi.py +0 -113
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_queries/local_ip.py +0 -41
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_queries/qqgroup.py +0 -370
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_queries/send_msg.py +0 -131
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_queries/utils.py +0 -212
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_server/__init__.py +0 -118
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_server/index.py +0 -0
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_server/rcon.py +0 -53
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_server/workshop.py +0 -82
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_update/__init__.py +0 -137
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_update/draw_update_log.py +0 -45
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_update/restart.py +0 -69
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_update/update.py +0 -53
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_utils/classcal.py +0 -53
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_utils/command.py +0 -23
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_utils/config.py +0 -201
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_utils/message.py +0 -59
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_utils/rule.py +0 -35
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_utils/seach.py +0 -43
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_utils/txt_to_img.py +0 -32
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_web/web.py +0 -277
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_web/webUI.py +0 -506
- nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_web/webUI_s.py +0 -94
- nonebot_plugin_l4d2_server-0.6.6/pyproject.toml +0 -130
- {nonebot_plugin_l4d2_server-0.6.6 → nonebot_plugin_l4d2_server-1.0.0a2}/LICENSE +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image/template → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/anne}/anne.html +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image/template → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/anne}/group_ip.html +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image/template → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img/anne}/ip.html +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img}/template/fingerprint.svg +0 -0
- {nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/data/L4D2/image → nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_image/img}/template/vue.css +0 -0
- /nonebot_plugin_l4d2_server-0.6.6/nonebot_plugin_l4d2_server/l4d2_data/database.py → /nonebot_plugin_l4d2_server-1.0.0a2/nonebot_plugin_l4d2_server/l4_request/utils.py +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nonebot-plugin-l4d2-server
|
3
|
-
Version: 0.
|
3
|
+
Version: 1.0.0a2
|
4
4
|
Summary: L4D2 server related operations plugin for NoneBot2
|
5
|
-
Keywords: steam
|
5
|
+
Keywords: steam,game,l4d2,nonebot2,plugin
|
6
6
|
Home-page: https://github.com/Agnes4m/nonebot_plugin_l4d2_server
|
7
7
|
Author-Email: Agnes_Digital <Z735803792@163.com>
|
8
8
|
License: GPLv3
|
@@ -16,29 +16,22 @@ Classifier: Operating System :: OS Independent
|
|
16
16
|
Project-URL: Homepage, https://github.com/Agnes4m/nonebot_plugin_l4d2_server
|
17
17
|
Requires-Python: <4.0,>=3.9
|
18
18
|
Requires-Dist: nonebot2>=2.0.0
|
19
|
-
Requires-Dist: nonebot-plugin-htmlrender
|
20
|
-
Requires-Dist:
|
21
|
-
Requires-Dist: nonebot-plugin-
|
22
|
-
Requires-Dist:
|
23
|
-
Requires-Dist: nonebot-plugin-
|
24
|
-
Requires-Dist: asyncio>=3.4.3
|
19
|
+
Requires-Dist: nonebot-plugin-htmlrender>=0.3.0
|
20
|
+
Requires-Dist: nonebot-adapter-onebot>=2.4.4
|
21
|
+
Requires-Dist: nonebot-plugin-alconna>=0.50.0
|
22
|
+
Requires-Dist: nonebot_plugin_datastore>=1.3.0
|
23
|
+
Requires-Dist: nonebot-plugin-tortoise-orm>=0.1.4
|
25
24
|
Requires-Dist: aiohttp>=3.8.4
|
26
25
|
Requires-Dist: jinja2>=3.0.0
|
27
26
|
Requires-Dist: srctools>=2.3.9
|
28
|
-
Requires-Dist:
|
29
|
-
Requires-Dist:
|
30
|
-
Requires-Dist: rcon==2.1.0
|
31
|
-
Requires-Dist: pillow<10.0.0
|
32
|
-
Requires-Dist: pyunpack>=0.3.0
|
33
|
-
Requires-Dist: ruamel.yaml==0.17.21
|
34
|
-
Requires-Dist: rarfile>=4.0
|
35
|
-
Requires-Dist: patool>=1.12
|
27
|
+
Requires-Dist: httpx<0.24.1,>=0.22.0
|
28
|
+
Requires-Dist: msgspec>=0.18.0
|
36
29
|
Requires-Dist: python-a2s>=1.3.0
|
37
|
-
Requires-Dist:
|
38
|
-
Requires-Dist:
|
39
|
-
Requires-Dist:
|
40
|
-
Requires-Dist:
|
41
|
-
Requires-Dist:
|
30
|
+
Requires-Dist: ujson>=5.10.0
|
31
|
+
Requires-Dist: lxml>=5.2.2
|
32
|
+
Requires-Dist: rcon>=2.1.0
|
33
|
+
Requires-Dist: pillow>9
|
34
|
+
Requires-Dist: beautifulsoup4>=4.12.3
|
42
35
|
Description-Content-Type: text/markdown
|
43
36
|
|
44
37
|
<!-- markdownlint-disable MD026 MD031 MD033 MD036 MD041 MD046 MD051 -->
|
@@ -50,7 +43,7 @@ Description-Content-Type: text/markdown
|
|
50
43
|
|
51
44
|
<div align="center">
|
52
45
|
|
53
|
-
# nonebot_plugin_l4d2_server 0.
|
46
|
+
# nonebot_plugin_l4d2_server 1.0.0a1
|
54
47
|
|
55
48
|
_✨Nonebot & Left 4 Dead 2 server操作✨_
|
56
49
|
<div align = "center">
|
@@ -74,37 +67,29 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
74
67
|
<img src="https://img.shields.io/pypi/dm/nonebot_plugin_l4d2_server" alt="pypi download">
|
75
68
|
</a>
|
76
69
|
<img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
|
77
|
-
<img src="https://img.shields.io/badge/nonebot-2.0.0
|
70
|
+
<img src="https://img.shields.io/badge/nonebot-2.0.0+-red.svg" alt="NoneBot">
|
78
71
|
|
79
72
|
</div>
|
80
73
|
|
81
|
-
##
|
74
|
+
## 顶置公告(如果以前用0.x.x版本暂时别更新)
|
82
75
|
|
83
|
-
-
|
76
|
+
- **版本** 1.x.x进行了破坏式更新,目前处于测试阶段,使用旧插件的不要更新
|
84
77
|
|
85
|
-
|
78
|
+
## 更改部分
|
86
79
|
|
87
|
-
-
|
88
|
-
|
89
|
-
-
|
80
|
+
- 取消了网页控制台(没有卵用)
|
81
|
+
- 取消了自动重启(与其他插件功能重复)
|
82
|
+
- 取消了git拉取更新(nb规范用pypi)
|
83
|
+
- 增加pil和浏览器渲染做选择(可以选择pil以节省性能性能)
|
84
|
+
- 删除无用部分(依赖太多难以维护)
|
90
85
|
|
91
86
|
## 安装
|
92
87
|
|
93
88
|
以下提到的方法 任选**其一** 即可
|
94
89
|
|
95
|
-
<details open>
|
96
|
-
<summary>[个人推荐] 使用 nb-cli 安装</summary>
|
97
|
-
在 nonebot2 项目插件文件夹中,输入以下指令克隆项目,并安装相关依赖(如果有虚拟环境,pip安装依赖需要进虚拟环境再安装,或者参考下方包管理器安装方法)
|
98
|
-
|
99
|
-
```bash
|
100
|
-
https://github.com/Agnes4m/nonebot_plugin_l4d2_server
|
101
|
-
pip install --no-install nonebot_plugin_l4d2_server
|
102
|
-
```
|
103
|
-
|
104
|
-
</details>
|
105
90
|
|
106
91
|
<details open>
|
107
|
-
<summary>[
|
92
|
+
<summary>[推荐] 使用 nb-cli 安装</summary>
|
108
93
|
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
|
109
94
|
|
110
95
|
```bash
|
@@ -153,24 +138,36 @@ conda install nonebot-plugin-l4d2-server
|
|
153
138
|
|
154
139
|
## 主要功能
|
155
140
|
|
156
|
-
-
|
157
|
-
- 批量查询指定ip服务器状态和玩家
|
158
|
-
-
|
159
|
-
- web控制台
|
160
|
-
- [求生电信服anne](https://github.com/fantasylidong/CompetitiveWithAnne)[查询~](https://sb.trygek.com/l4d_stats/ranking/index.php)
|
141
|
+
- [ ] 求生服务器-本地多路径操作(传地图等)
|
142
|
+
- [ ] 批量查询指定ip服务器状态和玩家
|
143
|
+
- [ ] [求生电信服anne](https://github.com/fantasylidong/CompetitiveWithAnne)[查询~](https://sb.trygek.com/l4d_stats/ranking/index.php)
|
161
144
|
|
162
145
|
## [数据结构](./docs/standand.md)
|
163
146
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
147
|
+
暂未更新
|
148
|
+
|
149
|
+
## env设置
|
150
|
+
|
151
|
+
"""bash
|
152
|
+
l4_anne = False
|
153
|
+
"""是否启用anne电信服相关功能"""
|
154
|
+
l4_enable = True
|
155
|
+
"""是否全局启用求生功能"""
|
156
|
+
l4_image = False
|
157
|
+
"""是否启用图片"""
|
158
|
+
l4_connect = True
|
159
|
+
"""是否在查服命令后加入connect ip"""
|
160
|
+
l4_path = "data/L4D2"
|
161
|
+
"""插件数据路径"""
|
162
|
+
l4_players = 4
|
163
|
+
"""查询总图的时候展示的用户数量"""
|
164
|
+
l4_style = "default"
|
165
|
+
"""图片风格,可选包括以下,默认简洁
|
166
|
+
- 暗风格
|
167
|
+
- 孤独摇滚
|
168
|
+
- 电玩像素
|
169
|
+
- 缤纷彩虹
|
170
|
+
"""
|
174
171
|
|
175
172
|
## 其他
|
176
173
|
|
@@ -183,18 +180,12 @@ conda install nonebot-plugin-l4d2-server
|
|
183
180
|
## 🌐 感谢
|
184
181
|
|
185
182
|
- [nonebot2](https://github.com/nonebot/nonebot2)- 聊天机器人的基础框架
|
186
|
-
- [
|
187
|
-
-
|
188
|
-
-
|
189
|
-
|
190
|
-
- [群聊学习](https://github.com/CMHopeSunshine/nonebot-plugin-learning-chat)- web控制台参考
|
191
|
-
- [日向麻麻](https://github.com/Special-Week)- 配置优化参考
|
192
|
-
- [gsuid](https://github.com/KimigaiiWuyi/GenshinUID)- readme和wiki的格式参考,以及3.1版本的更新和重启
|
193
|
-
- 公益服刷服器 - 虽然不知道哪里来的,不过已经添加ip了
|
183
|
+
- [饼干](https://github.com/lgc2333) - 指导nonebot2框架的函数使用
|
184
|
+
- [wuyi](https://github.com/KimigaiiWuyi/) - 指导pil作图
|
185
|
+
- 水果 - html图片优化
|
186
|
+
|
194
187
|
- 感谢以下服主大力支持
|
195
|
-
- Michaela's | 机器人功能测试反馈
|
188
|
+
- Michaela's | 机器人功能测试反馈
|
196
189
|
- 东 | 提供docker部署方法等建议 | [电信服anne游戏群](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=6i7r5aJ7Jyg0ejby4rt9GWmFRF53nV1K&authKey=ekMsWepBZPL26%2BfJAG%2F95JD0fhvH39%2BIGVyKOvNlXVDbpIclJlly4kXqukL7JhWR&noverify=0&group_code=883237206)
|
197
|
-
- 呆呆 | 提供三方地图的详细数据 | [呆呆组游戏群](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=M5Ei0tYBgi3nwkh-8jfvo3gN5BMhPQGr&authKey=tb2Qa7ykUf5RAe3TBvOIA%2FWdlHAx6tqYXhyV95WqbZXoUx7lU2MRbod7nubiFw16&noverify=0&group_code=592944622)
|
198
|
-
- 柠檬茶 | win端部署测试 | [竹服⭐纯净服游戏群](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=G8AkutNEmN9niNCjNJV8YE-vLv4h_EBz&authKey=wG%2BI6Cks4%2FcRGYYLjRNK0Kg4rMUy3BB7H9SKGjU465ktqKcb%2F6m7WxrSTJiX5bvk&noverify=0&group_code=283150432)
|
199
190
|
- 迷茫 | 催命更新byd
|
200
191
|
- ArcPav | 积极反馈bug,提供改进思路
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<div align="center">
|
9
9
|
|
10
|
-
# nonebot_plugin_l4d2_server 0.
|
10
|
+
# nonebot_plugin_l4d2_server 1.0.0a1
|
11
11
|
|
12
12
|
_✨Nonebot & Left 4 Dead 2 server操作✨_
|
13
13
|
<div align = "center">
|
@@ -31,37 +31,29 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
31
31
|
<img src="https://img.shields.io/pypi/dm/nonebot_plugin_l4d2_server" alt="pypi download">
|
32
32
|
</a>
|
33
33
|
<img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
|
34
|
-
<img src="https://img.shields.io/badge/nonebot-2.0.0
|
34
|
+
<img src="https://img.shields.io/badge/nonebot-2.0.0+-red.svg" alt="NoneBot">
|
35
35
|
|
36
36
|
</div>
|
37
37
|
|
38
|
-
##
|
38
|
+
## 顶置公告(如果以前用0.x.x版本暂时别更新)
|
39
39
|
|
40
|
-
-
|
40
|
+
- **版本** 1.x.x进行了破坏式更新,目前处于测试阶段,使用旧插件的不要更新
|
41
41
|
|
42
|
-
|
42
|
+
## 更改部分
|
43
43
|
|
44
|
-
-
|
45
|
-
|
46
|
-
-
|
44
|
+
- 取消了网页控制台(没有卵用)
|
45
|
+
- 取消了自动重启(与其他插件功能重复)
|
46
|
+
- 取消了git拉取更新(nb规范用pypi)
|
47
|
+
- 增加pil和浏览器渲染做选择(可以选择pil以节省性能性能)
|
48
|
+
- 删除无用部分(依赖太多难以维护)
|
47
49
|
|
48
50
|
## 安装
|
49
51
|
|
50
52
|
以下提到的方法 任选**其一** 即可
|
51
53
|
|
52
|
-
<details open>
|
53
|
-
<summary>[个人推荐] 使用 nb-cli 安装</summary>
|
54
|
-
在 nonebot2 项目插件文件夹中,输入以下指令克隆项目,并安装相关依赖(如果有虚拟环境,pip安装依赖需要进虚拟环境再安装,或者参考下方包管理器安装方法)
|
55
|
-
|
56
|
-
```bash
|
57
|
-
https://github.com/Agnes4m/nonebot_plugin_l4d2_server
|
58
|
-
pip install --no-install nonebot_plugin_l4d2_server
|
59
|
-
```
|
60
|
-
|
61
|
-
</details>
|
62
54
|
|
63
55
|
<details open>
|
64
|
-
<summary>[
|
56
|
+
<summary>[推荐] 使用 nb-cli 安装</summary>
|
65
57
|
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
|
66
58
|
|
67
59
|
```bash
|
@@ -110,24 +102,36 @@ conda install nonebot-plugin-l4d2-server
|
|
110
102
|
|
111
103
|
## 主要功能
|
112
104
|
|
113
|
-
-
|
114
|
-
- 批量查询指定ip服务器状态和玩家
|
115
|
-
-
|
116
|
-
- web控制台
|
117
|
-
- [求生电信服anne](https://github.com/fantasylidong/CompetitiveWithAnne)[查询~](https://sb.trygek.com/l4d_stats/ranking/index.php)
|
105
|
+
- [ ] 求生服务器-本地多路径操作(传地图等)
|
106
|
+
- [ ] 批量查询指定ip服务器状态和玩家
|
107
|
+
- [ ] [求生电信服anne](https://github.com/fantasylidong/CompetitiveWithAnne)[查询~](https://sb.trygek.com/l4d_stats/ranking/index.php)
|
118
108
|
|
119
109
|
## [数据结构](./docs/standand.md)
|
120
110
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
111
|
+
暂未更新
|
112
|
+
|
113
|
+
## env设置
|
114
|
+
|
115
|
+
"""bash
|
116
|
+
l4_anne = False
|
117
|
+
"""是否启用anne电信服相关功能"""
|
118
|
+
l4_enable = True
|
119
|
+
"""是否全局启用求生功能"""
|
120
|
+
l4_image = False
|
121
|
+
"""是否启用图片"""
|
122
|
+
l4_connect = True
|
123
|
+
"""是否在查服命令后加入connect ip"""
|
124
|
+
l4_path = "data/L4D2"
|
125
|
+
"""插件数据路径"""
|
126
|
+
l4_players = 4
|
127
|
+
"""查询总图的时候展示的用户数量"""
|
128
|
+
l4_style = "default"
|
129
|
+
"""图片风格,可选包括以下,默认简洁
|
130
|
+
- 暗风格
|
131
|
+
- 孤独摇滚
|
132
|
+
- 电玩像素
|
133
|
+
- 缤纷彩虹
|
134
|
+
"""
|
131
135
|
|
132
136
|
## 其他
|
133
137
|
|
@@ -140,18 +144,12 @@ conda install nonebot-plugin-l4d2-server
|
|
140
144
|
## 🌐 感谢
|
141
145
|
|
142
146
|
- [nonebot2](https://github.com/nonebot/nonebot2)- 聊天机器人的基础框架
|
143
|
-
- [
|
144
|
-
-
|
145
|
-
-
|
146
|
-
|
147
|
-
- [群聊学习](https://github.com/CMHopeSunshine/nonebot-plugin-learning-chat)- web控制台参考
|
148
|
-
- [日向麻麻](https://github.com/Special-Week)- 配置优化参考
|
149
|
-
- [gsuid](https://github.com/KimigaiiWuyi/GenshinUID)- readme和wiki的格式参考,以及3.1版本的更新和重启
|
150
|
-
- 公益服刷服器 - 虽然不知道哪里来的,不过已经添加ip了
|
147
|
+
- [饼干](https://github.com/lgc2333) - 指导nonebot2框架的函数使用
|
148
|
+
- [wuyi](https://github.com/KimigaiiWuyi/) - 指导pil作图
|
149
|
+
- 水果 - html图片优化
|
150
|
+
|
151
151
|
- 感谢以下服主大力支持
|
152
|
-
- Michaela's | 机器人功能测试反馈
|
152
|
+
- Michaela's | 机器人功能测试反馈
|
153
153
|
- 东 | 提供docker部署方法等建议 | [电信服anne游戏群](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=6i7r5aJ7Jyg0ejby4rt9GWmFRF53nV1K&authKey=ekMsWepBZPL26%2BfJAG%2F95JD0fhvH39%2BIGVyKOvNlXVDbpIclJlly4kXqukL7JhWR&noverify=0&group_code=883237206)
|
154
|
-
- 呆呆 | 提供三方地图的详细数据 | [呆呆组游戏群](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=M5Ei0tYBgi3nwkh-8jfvo3gN5BMhPQGr&authKey=tb2Qa7ykUf5RAe3TBvOIA%2FWdlHAx6tqYXhyV95WqbZXoUx7lU2MRbod7nubiFw16&noverify=0&group_code=592944622)
|
155
|
-
- 柠檬茶 | win端部署测试 | [竹服⭐纯净服游戏群](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=G8AkutNEmN9niNCjNJV8YE-vLv4h_EBz&authKey=wG%2BI6Cks4%2FcRGYYLjRNK0Kg4rMUy3BB7H9SKGjU465ktqKcb%2F6m7WxrSTJiX5bvk&noverify=0&group_code=283150432)
|
156
154
|
- 迷茫 | 催命更新byd
|
157
155
|
- ArcPav | 积极反馈bug,提供改进思路
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"""
|
2
|
+
* Copyright (c) 2023, Agnes Digital
|
3
|
+
*
|
4
|
+
* This program is free software: you can redistribute it and/or modify
|
5
|
+
* it under the terms of the GNU General Public License as published by
|
6
|
+
* the Free Software Foundation, either version 3 of the License, or
|
7
|
+
* (at your option) any later version.
|
8
|
+
*
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
* GNU General Public License for more details.
|
13
|
+
*
|
14
|
+
* You should have received a copy of the GNU General Public License
|
15
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
16
|
+
"""
|
17
|
+
|
18
|
+
from nonebot import get_driver, require
|
19
|
+
|
20
|
+
require("nonebot_plugin_htmlrender")
|
21
|
+
require("nonebot_plugin_alconna")
|
22
|
+
require("nonebot_plugin_tortoise_orm")
|
23
|
+
|
24
|
+
from nonebot.plugin import PluginMetadata, inherit_supported_adapters # noqa: E402
|
25
|
+
|
26
|
+
from . import __main__ as __main__ # noqa: E402
|
27
|
+
from .config import ConfigModel # noqa: E402
|
28
|
+
from .l4_help import __version__ # noqa: E402
|
29
|
+
|
30
|
+
driver = get_driver()
|
31
|
+
|
32
|
+
|
33
|
+
__plugin_meta__ = PluginMetadata(
|
34
|
+
name="求生之路小助手",
|
35
|
+
description="可用于管理求生之路查服和本地管理",
|
36
|
+
usage="群内对有关求生之路的查询和操作",
|
37
|
+
config=ConfigModel,
|
38
|
+
type="application",
|
39
|
+
homepage="https://github.com/Agnes4m/nonebot_plugin_l4d2_server",
|
40
|
+
supported_adapters=inherit_supported_adapters("nonebot_plugin_alconna"),
|
41
|
+
extra={
|
42
|
+
"version": __version__,
|
43
|
+
"author": "Agnes4m <Z735803792@163.com>",
|
44
|
+
},
|
45
|
+
)
|
@@ -0,0 +1,140 @@
|
|
1
|
+
"""
|
2
|
+
* Copyright (c) 2023, Agnes Digital
|
3
|
+
*
|
4
|
+
* This program is free software: you can redistribute it and/or modify
|
5
|
+
* it under the terms of the GNU General Public License as published by
|
6
|
+
* the Free Software Foundation, either version 3 of the License, or
|
7
|
+
* (at your option) any later version.
|
8
|
+
*
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
* GNU General Public License for more details.
|
13
|
+
*
|
14
|
+
* You should have received a copy of the GNU General Public License
|
15
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
16
|
+
"""
|
17
|
+
|
18
|
+
from typing import TYPE_CHECKING, List, Optional
|
19
|
+
|
20
|
+
from nonebot.adapters import Message
|
21
|
+
from nonebot.log import logger
|
22
|
+
from nonebot.matcher import Matcher
|
23
|
+
from nonebot.params import CommandArg, CommandStart, RawCommand
|
24
|
+
from nonebot.plugin import on_command
|
25
|
+
from nonebot_plugin_alconna import UniMessage
|
26
|
+
|
27
|
+
from .config import config
|
28
|
+
from .l4_help import get_l4d2_core_help
|
29
|
+
from .l4_request import (
|
30
|
+
COMMAND,
|
31
|
+
get_all_server_detail,
|
32
|
+
get_ip_server,
|
33
|
+
get_server_detail,
|
34
|
+
reload_ip,
|
35
|
+
)
|
36
|
+
from .utils.api.request import L4API
|
37
|
+
|
38
|
+
if TYPE_CHECKING:
|
39
|
+
from .utils.api.models import OutServer
|
40
|
+
|
41
|
+
reload_ip()
|
42
|
+
|
43
|
+
l4_help = on_command("l4help", aliases={"l4帮助", "l4d2帮助"})
|
44
|
+
l4_request = on_command("anne", aliases=COMMAND, priority=10)
|
45
|
+
l4_reload = on_command("l4reload", aliases={"l4刷新,l4重载"})
|
46
|
+
l4_all = on_command("l4all", aliases={"l4全服"})
|
47
|
+
l4_connect = on_command("connect", aliases={"l4连接"})
|
48
|
+
l4_find_player = on_command("l4find", aliases={"l4查找"})
|
49
|
+
|
50
|
+
|
51
|
+
@l4_help.handle()
|
52
|
+
async def _(matcher: Matcher):
|
53
|
+
"""帮助"""
|
54
|
+
logger.info("开始执行[l4d2帮助]")
|
55
|
+
im = await get_l4d2_core_help()
|
56
|
+
if isinstance(im, str):
|
57
|
+
await matcher.finish(im)
|
58
|
+
await UniMessage.image(raw=im).send()
|
59
|
+
|
60
|
+
|
61
|
+
@l4_request.handle()
|
62
|
+
async def _(
|
63
|
+
start: str = CommandStart(),
|
64
|
+
command: str = RawCommand(),
|
65
|
+
args: Message = CommandArg(),
|
66
|
+
):
|
67
|
+
"""例:
|
68
|
+
指令: /橘5
|
69
|
+
start: /(command开头指令)
|
70
|
+
command: /橘(响应的全部指令)
|
71
|
+
args: 5(响应的指令后的数字)
|
72
|
+
"""
|
73
|
+
|
74
|
+
if start:
|
75
|
+
command = command.replace(start, "")
|
76
|
+
if command == "anne":
|
77
|
+
command = "云"
|
78
|
+
_id: Optional[str] = args.extract_plain_text()
|
79
|
+
if _id is not None and not _id.isdigit() and _id:
|
80
|
+
return
|
81
|
+
if not _id:
|
82
|
+
_id = None
|
83
|
+
logger.info(f"组:{command} ;数字:{_id}")
|
84
|
+
msg = await get_server_detail(command, _id)
|
85
|
+
if msg is not None:
|
86
|
+
if isinstance(msg, str):
|
87
|
+
await UniMessage.text(msg).finish()
|
88
|
+
if isinstance(msg, bytes):
|
89
|
+
await UniMessage.image(raw=msg).finish()
|
90
|
+
else:
|
91
|
+
await UniMessage.text("服务器无响应").finish()
|
92
|
+
|
93
|
+
|
94
|
+
@l4_find_player.handle()
|
95
|
+
async def _(
|
96
|
+
args: Message = CommandArg(),
|
97
|
+
):
|
98
|
+
msg: str = args.extract_plain_text().strip()
|
99
|
+
tag_list: List[str] = msg.split(" ", maxsplit=1)
|
100
|
+
if len(tag_list) < 2:
|
101
|
+
return await UniMessage.text("格式错误,正确格式:/l4find 组名 玩家名").finish()
|
102
|
+
group, name = tag_list
|
103
|
+
out: List[OutServer] = await get_server_detail(group, is_img=False) # type: ignore
|
104
|
+
out_msg = "未找到玩家"
|
105
|
+
for one in out:
|
106
|
+
for player in one["player"]:
|
107
|
+
if name in player.name:
|
108
|
+
out_msg = await get_ip_server(f"{one['host']}:{one['port']}")
|
109
|
+
|
110
|
+
return await UniMessage.text(out_msg).finish()
|
111
|
+
|
112
|
+
|
113
|
+
@l4_all.handle()
|
114
|
+
async def _():
|
115
|
+
await UniMessage.text(await get_all_server_detail()).finish()
|
116
|
+
|
117
|
+
|
118
|
+
@l4_connect.handle()
|
119
|
+
async def _(args: Message = CommandArg()):
|
120
|
+
ip: Optional[str] = args.extract_plain_text()
|
121
|
+
if ip is not None:
|
122
|
+
await UniMessage.text(await get_ip_server(ip)).finish()
|
123
|
+
|
124
|
+
|
125
|
+
# anne部分
|
126
|
+
if config.l4_anne:
|
127
|
+
logger.info("加载anne功能")
|
128
|
+
from .l4_anne import * # noqa: F403
|
129
|
+
|
130
|
+
|
131
|
+
@l4_reload.handle()
|
132
|
+
async def _(args: Message = CommandArg()):
|
133
|
+
arg = args.extract_plain_text().strip()
|
134
|
+
print(arg)
|
135
|
+
if not arg:
|
136
|
+
reload_ip()
|
137
|
+
logger.success("重载ip完成")
|
138
|
+
await UniMessage.text("重载ip完成").finish()
|
139
|
+
else:
|
140
|
+
print(await L4API.get_sourceban())
|
@@ -0,0 +1,35 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
|
3
|
+
from nonebot import get_plugin_config
|
4
|
+
from pydantic import BaseModel
|
5
|
+
|
6
|
+
DATAPATH = Path(__file__).parent.joinpath("data")
|
7
|
+
DATAOUT = Path("data/L4D2")
|
8
|
+
print(DATAOUT.absolute())
|
9
|
+
server_all_path = DATAOUT / "l4d2"
|
10
|
+
server_all_path.mkdir(parents=True, exist_ok=True)
|
11
|
+
|
12
|
+
ICONPATH = DATAPATH / "icon"
|
13
|
+
|
14
|
+
|
15
|
+
class ConfigModel(BaseModel):
|
16
|
+
l4_anne: bool = True
|
17
|
+
"""是否启用anne电信服相关功能"""
|
18
|
+
l4_enable: bool = True
|
19
|
+
"""是否全局启用求生功能"""
|
20
|
+
l4_image: bool = False
|
21
|
+
"""是否启用图片"""
|
22
|
+
l4_connect: bool = True
|
23
|
+
"""是否在查服命令后加入connect ip"""
|
24
|
+
l4_path: str = "data/L4D2"
|
25
|
+
"""插件数据路径"""
|
26
|
+
l4_players: int = 4
|
27
|
+
"""查询总图的时候展示的用户数量"""
|
28
|
+
l4_style: str = "default"
|
29
|
+
"""图片风格"""
|
30
|
+
l4_font: str = str(Path(__file__).parent.joinpath("data/font/loli.ttf"))
|
31
|
+
"""字体"""
|
32
|
+
l4_show_ip: bool = True
|
33
|
+
|
34
|
+
|
35
|
+
config = get_plugin_config(ConfigModel)
|
@@ -0,0 +1,124 @@
|
|
1
|
+
from nonebot import log as log, on_command # noqa: N999
|
2
|
+
from nonebot.adapters import Event, Message
|
3
|
+
from nonebot.log import logger
|
4
|
+
from nonebot.params import CommandArg
|
5
|
+
from nonebot_plugin_alconna import UniMessage
|
6
|
+
|
7
|
+
from ..utils.api.request import L4API
|
8
|
+
from ..utils.database.models import SteamUser
|
9
|
+
from ..utils.utils import get_message_at
|
10
|
+
from .ranne import get_anne_rank_out
|
11
|
+
|
12
|
+
anne_bind = on_command("Banne", aliases={"l4绑定", "anne绑定"}, priority=5, block=True)
|
13
|
+
anne_search = on_command("Sanne", aliases={"anne搜索"})
|
14
|
+
anne_rank = on_command("Ranne", aliases={"anne成绩"}, block=True, priority=1)
|
15
|
+
|
16
|
+
anne_del = on_command(
|
17
|
+
"Danne",
|
18
|
+
aliases={"l4删除", "anne删除", "l4解绑", "anne解绑"},
|
19
|
+
priority=5,
|
20
|
+
block=True,
|
21
|
+
)
|
22
|
+
|
23
|
+
|
24
|
+
@anne_search.handle()
|
25
|
+
async def _(args: Message = CommandArg()):
|
26
|
+
name: str = args.extract_plain_text().strip()
|
27
|
+
print(name)
|
28
|
+
user_list = await L4API.get_anne_steamid(name)
|
29
|
+
if user_list is None:
|
30
|
+
await UniMessage.text("未找到玩家").finish()
|
31
|
+
msg = f"---有{len(user_list)}个玩家---"
|
32
|
+
for index, user in enumerate(user_list, start=1):
|
33
|
+
if index >= 10:
|
34
|
+
break
|
35
|
+
msg += f"""
|
36
|
+
{index}. {user["name"]} | [{user["score"]}] | {user["play_time"]}
|
37
|
+
{user["steamid"]}
|
38
|
+
"""
|
39
|
+
if msg:
|
40
|
+
await UniMessage.text("\n".join(msg.splitlines())).finish()
|
41
|
+
else:
|
42
|
+
await UniMessage.text("没有找到玩家").finish()
|
43
|
+
|
44
|
+
|
45
|
+
@anne_bind.handle()
|
46
|
+
async def _(ev: Event, args: Message = CommandArg()):
|
47
|
+
arg: str = args.extract_plain_text()
|
48
|
+
if not arg:
|
49
|
+
await UniMessage.text("虚空绑定?").finish()
|
50
|
+
|
51
|
+
user = await SteamUser.get_or_none(userid=int(ev.get_user_id()))
|
52
|
+
if user is None:
|
53
|
+
user = await SteamUser.create(userid=int(ev.get_user_id()))
|
54
|
+
|
55
|
+
if len(arg) == 17:
|
56
|
+
# steamid64
|
57
|
+
logger.info(f"SteamID64:{arg}")
|
58
|
+
user.SteamID64 = arg
|
59
|
+
msg = "绑定steamid64"
|
60
|
+
|
61
|
+
elif arg.startswith("STEAM_"):
|
62
|
+
# steamid
|
63
|
+
logger.info(f"SteamID:{arg}")
|
64
|
+
user.SteamID = arg
|
65
|
+
msg = "绑定steamid"
|
66
|
+
|
67
|
+
else:
|
68
|
+
# name
|
69
|
+
logger.info(f"Name:{arg}")
|
70
|
+
user.Name = arg
|
71
|
+
msg = "绑定名字"
|
72
|
+
await user.save()
|
73
|
+
|
74
|
+
return await UniMessage.text(f"{msg}成功").finish()
|
75
|
+
|
76
|
+
|
77
|
+
@anne_del.handle()
|
78
|
+
async def _(ev: Event):
|
79
|
+
if record := await SteamUser.get_or_none(userid=int(ev.get_user_id())):
|
80
|
+
logger.info(f"删除用户:{record}")
|
81
|
+
await record.delete()
|
82
|
+
await record.save()
|
83
|
+
return await UniMessage.text("删除成功").finish()
|
84
|
+
return await UniMessage.text("没有绑定信息呢").finish()
|
85
|
+
|
86
|
+
|
87
|
+
@anne_rank.handle()
|
88
|
+
async def _(ev: Event, args: Message = CommandArg()):
|
89
|
+
uid = await get_message_at(str(ev.json()))
|
90
|
+
if uid is None:
|
91
|
+
uid = int(int(ev.get_user_id()))
|
92
|
+
steamid = ""
|
93
|
+
arg: str = args.extract_plain_text().strip()
|
94
|
+
logger.info(f"arg:{arg}")
|
95
|
+
# 优先从数据库查询
|
96
|
+
if not arg:
|
97
|
+
msg = await SteamUser.get_or_none(userid=uid)
|
98
|
+
if msg is not None:
|
99
|
+
steamid = msg.SteamID
|
100
|
+
if not steamid:
|
101
|
+
name = msg.Name
|
102
|
+
if not name:
|
103
|
+
await UniMessage.text("未绑定名字/steamid").finish()
|
104
|
+
msg_dict = await L4API.get_anne_steamid(name)
|
105
|
+
if not msg_dict:
|
106
|
+
await UniMessage.text("绑定的昵称找不到呢").finish()
|
107
|
+
steamid = msg_dict[0]["steamid"]
|
108
|
+
logger.info(f"steamid:{steamid}")
|
109
|
+
|
110
|
+
# 再从arg中查找
|
111
|
+
else:
|
112
|
+
if arg.startswith("STEAM_"):
|
113
|
+
steamid = arg
|
114
|
+
else:
|
115
|
+
arg_dict = await L4API.get_anne_steamid(arg)
|
116
|
+
if not arg_dict:
|
117
|
+
await UniMessage.text("未找到该昵称玩家").finish()
|
118
|
+
steamid = arg_dict[0]["steamid"]
|
119
|
+
if not steamid:
|
120
|
+
await UniMessage.text("未找到玩家,请使用指令`l4搜索`查找").finish()
|
121
|
+
out_msg = await get_anne_rank_out(steamid)
|
122
|
+
if out_msg is None:
|
123
|
+
await UniMessage.text("未找到玩家").finish()
|
124
|
+
await UniMessage.text(out_msg).finish()
|