上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 41 下一页
摘要: ``` from .data_source import getrandomurl @on_command('picsending',aliases=('二次元图','美图','二刺螈图','ecyt')) async def picsending(session: CommandSession): 阅读全文
posted @ 2023-07-27 22:24 N0zoM1z0 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 注意一个点:json文件要将 读写分开操作(两个with open操作) 合并在一起的话会出现不能覆盖原json文档的情况 (然后调半天。。。) ``` u_id = session.event.user_id with open(pth, 'r+', encoding = 'utf-8') as 阅读全文
posted @ 2023-07-27 21:48 N0zoM1z0 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 问了gpt才知道 原来可以用多个 Commansession 形成一个嵌套形式 每个命令(params)用一个 异步函数实现即可 不得不说 gpt还是6的(一个号每天可以80次 我有3个号… 真香.jpg) ``` from nonebot import on_command, CommandSes 阅读全文
posted @ 2023-07-27 18:51 N0zoM1z0 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 通过 time.localtime(time.time())实现每天更新排名 ``` import time import json from nonebot import on_command, CommandSession from nonebot import on_natural_langu 阅读全文
posted @ 2023-07-24 20:07 N0zoM1z0 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 1.运行 pip uninstall aiocphttp quart jinja2 -y 2.pip uninstall nonebot 3.pip install nonebot 下载插件会出现一些奇奇怪怪的兼容性问题 阅读全文
posted @ 2023-07-24 18:15 N0zoM1z0 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 安装对应版本的 go-cqhttp 以及通过镜像下载 pip install nonebot 在配置文件 修改Robot的QQ号 以及对应的 IP 和 port 写一个bot运行程序 然后扫码登陆即可 自定义插件 新建plugins 每个插件对应编写 __init__.py 和 data_sourc 阅读全文
posted @ 2023-07-22 14:46 N0zoM1z0 阅读(33) 评论(0) 推荐(0) 编辑
摘要: pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple 替换上面的selenium即可 阅读全文
posted @ 2023-07-12 23:19 N0zoM1z0 阅读(3) 评论(0) 推荐(0) 编辑
摘要: ``` #include using namespace std; const int N=1e5+5; const int inf=INT_MAX; int n,m,e,s,t; struct Graph { int nxt,to,w; } edge[Nq; q.push(s); vis[s]=1 阅读全文
posted @ 2023-06-09 18:54 N0zoM1z0 阅读(2) 评论(0) 推荐(0) 编辑
摘要: ``` #include using namespace std; template void read(T& x) { x=0; int f=1; char ch=getchar(); while(ch'9') { if(ch=='-')f=-1; ch=getchar(); } while(ch 阅读全文
posted @ 2023-06-09 18:29 N0zoM1z0 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 注意φ(m)的求法 和细节处理 ``` #include using namespace std; #define int long long int a,m; void MOD(int& x) { x=(x%m+m)%m; } string s; int qpow(int a,int b) { i 阅读全文
posted @ 2023-06-09 18:15 N0zoM1z0 阅读(5) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 41 下一页