mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
删除冗余import
更新README.md
This commit is contained in:
parent
0ee3645229
commit
4379df5faa
4 changed files with 18 additions and 12 deletions
|
|
@ -195,18 +195,20 @@ qr_fortune
|
||||||
--今日运势日志,存储该用户是否已经查询过运势
|
--今日运势日志,存储该用户是否已经查询过运势
|
||||||
qr_fortune_log
|
qr_fortune_log
|
||||||
|
|
||||||
--用户列表
|
--用户表
|
||||||
user_list
|
user_list
|
||||||
--用户待办表
|
--用户待办表
|
||||||
user_todo_list
|
user_todo_list
|
||||||
|
|
||||||
--管理员表
|
--管理员表
|
||||||
admin_list
|
admin_list
|
||||||
|
--群聊表
|
||||||
|
group_list
|
||||||
```
|
```
|
||||||
|
|
||||||
初始化相关脚本存放在 [<b>src/my_sqlite/data_init</b>](src/my_sqlite/data_init) 目录下。
|
初始化相关脚本存放在 [<b>src/my_sqlite/data_init</b>](src/my_sqlite/data_init) 目录下。
|
||||||
|
|
||||||
每次启动机器人,程序会自动检查上述七张表是否存在,有表缺失则会在数据库中自动创建对应的表。
|
每次启动机器人,程序会自动检查上述8张表是否存在,有表缺失则会在数据库中自动创建对应的表。
|
||||||
|
|
||||||
对已存在的表不做处理。
|
对已存在的表不做处理。
|
||||||
|
|
||||||
|
|
@ -308,7 +310,7 @@ chat_ai:
|
||||||
admin_password: "<key>" # 设置管理员认证密码
|
admin_password: "<key>" # 设置管理员认证密码
|
||||||
```
|
```
|
||||||
|
|
||||||
在上述<i>"\<key>'"</i>中填入你的密码。
|
在上述<i>"\<key>"</i>中填入你的密码。
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from sqlalchemy import Column, Integer, String, Date, create_engine, text
|
from sqlalchemy import create_engine, text
|
||||||
from sqlalchemy.orm import declarative_base, sessionmaker
|
from sqlalchemy.orm import sessionmaker
|
||||||
|
|
||||||
class SqliteSqlalchemy(object):
|
class SqliteSqlalchemy(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
import requests
|
import requests
|
||||||
from nonebot.rule import to_me
|
|
||||||
from nonebot.plugin import on_command
|
from nonebot.plugin import on_command
|
||||||
from nonebot.adapters.qq import Message, MessageEvent, MessageSegment
|
from nonebot.rule import to_me
|
||||||
|
|
||||||
cf_query = on_command("cf", rule=to_me(), priority=10, block=True)
|
cf_query = on_command("cf", rule=to_me(), priority=10, block=True)
|
||||||
@cf_query.handle()
|
@cf_query.handle()
|
||||||
async def get_cf_rounds():
|
async def get_cf_rounds():
|
||||||
|
await cf_query.send("正在为您整理近期比赛信息哦~\n请稍等💭💡🎈")
|
||||||
|
try:
|
||||||
result = requests.get('https://codeforces.com/api/contest.list?gym=false').json()
|
result = requests.get('https://codeforces.com/api/contest.list?gym=false').json()
|
||||||
print("正在请求codefoeces比赛API")
|
except:
|
||||||
|
await cf_query.finish("API请求失败,这绝对不是咱的错,绝对不是!")
|
||||||
|
|
||||||
|
print("正在请求codeforces比赛API")
|
||||||
i = False
|
i = False
|
||||||
all_matches = ""
|
all_matches = ""
|
||||||
for matches in result['result']:
|
for matches in result['result']:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
from nonebot.rule import to_me
|
from nonebot.adapters.qq import MessageEvent
|
||||||
from nonebot.plugin import on_command
|
from nonebot.plugin import on_command
|
||||||
from nonebot.adapters.qq import Message, MessageEvent, MessageSegment
|
from nonebot.rule import to_me
|
||||||
from src.my_sqlite.todo_by_sqlite import *
|
|
||||||
|
|
||||||
|
from src.my_sqlite.todo_by_sqlite import *
|
||||||
|
|
||||||
get_todo_list = on_command("待办查询", rule=to_me(), priority=10, block=True, aliases={"代办", "daiban"})
|
get_todo_list = on_command("待办查询", rule=to_me(), priority=10, block=True, aliases={"代办", "daiban"})
|
||||||
@get_todo_list.handle()
|
@get_todo_list.handle()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue