一个普通的随心而为的程序开发者
bakaolc / ritsukage-core Goto Github PK
View Code? Open in Web Editor NEWBot core for ritsukage
License: GNU Affero General Public License v3.0
Bot core for ritsukage
License: GNU Affero General Public License v3.0
Run these commands in order.
ubuntu@VM-4-11-ubuntu:~/project/dt$ stty
speed 9600 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-icanon -iexten
ubuntu@VM-4-11-ubuntu:~/project/dt$ cat Program.cs
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
var a = 0;
string s = Console.ReadLine();
Console.WriteLine("Read:");
Console.WriteLine(s);
var x = 1 / a;
// Environment.Exit(-1);
ubuntu@VM-4-11-ubuntu:~/project/dt$ dotnet run
/home/ubuntu/project/dt/Program.cs(4,12): warning CS8600: Converting null literal or possible null value to non-nullable type. [/home/ubuntu/project/dt/dt.csproj]
Hello, World!
123
Read:
123
Unhandled exception. System.DivideByZeroException: Attempted to divide by zero.
at Program.<Main>$(String[] args) in /home/ubuntu/project/dt/Program.cs:line 8
ubuntu@VM-4-11-ubuntu:~/project/dt$
min = 1; time = 0;
-brkint -icrnl -imaxbel
-icanon -iexten -echo
Observed that -echo
.
And ... the version.
ubuntu@VM-4-11-ubuntu:~/project/dt$ dotnet --version
7.0.302
ubuntu@VM-4-11-ubuntu:~/project/dt$ uname -a
Linux VM-4-11-ubuntu 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
不知道什么原因,dotnet run读了命令行输入之后报错退出会关掉回显给不会用linux的人带来了很多问号。
希望能够给整点机制保证大部分异常不会直接炸串(try catch..?)
测个ubuntu被炸的哭死
可以存放一些资源下载链接给bot,后续有人询问的时候可以直接使用bot拉出消息
如 查看现有资源
活7
活6
东方幕华祭红月篇1.0版本
东方真珠岛
(以及其他)
这种,然后 获取资源 活7
下载链接: https://pan.baidu.com/s/1i5ra8G9 密码: 4wxm
这种,大概,不知道会不会有用)x
预期在 dotnet8 发布后对框架和逻辑代码进行重构和拆分,重新进行设计与开发
目标是支持多平台的运行并通过支持插件的方式来提供对各个服务的运行
当前预期支持目标:Discord.Net,mirai-api-http,Go-CQHttp
不再使用 Sora 进行针对 Go-CQHttp 的中转支持
操作平台
QQ
bug描述
+tipremove <NoSuchTipId>
public static async Task<T> GetAsync<T>(Expression<Func<T, bool>> predicate) where T : new()
=> (await Where(predicate)).First();
There is no first element and then crashed.
如何复现
+tipremove <NoSuchTipId>
错误截图或日志
[6/5/2023 8:42:42 PM][DEBUG][Commands]Parser: +tipremove 6
[6/5/2023 8:42:42 PM][DEBUG][Commands]Arguments:
1| "6"
[6/5/2023 8:42:42 PM][DEBUG][Commands]found 1 command(s) for tipremove
[6/5/2023 8:42:42 PM][DEBUG][Commands]>> Start the precondition check for Void TipRemove(Ritsukage.QQ.SoraMessage, Int32)
[6/5/2023 8:42:42 PM][DEBUG][Commands] >> Precondition: [<Can work in: Group>] √ Passed.
[6/5/2023 8:42:42 PM][DEBUG][Commands]>> Precondition check passed.
[6/5/2023 8:42:42 PM][DEBUG][Commands]Try to parse parameters for Void TipRemove(Ritsukage.QQ.SoraMessage, Int32).
[6/5/2023 8:42:42 PM][DEBUG][Commands]Invoke Void TipRemove(Ritsukage.QQ.SoraMessage, Int32).
Unhandled exception. System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at lambda_method4999(Closure)
at Ritsukage.Library.Data.Database.GetAsync[T](Expression`1 predicate) in /home/ubuntu/project/Ritsukage-Core/Ritsukage-Core/Library/Data/Database.cs:line 117
at Ritsukage.Library.Service.TipMessageService.GetTipMessageById(Int32 id) in /home/ubuntu/project/Ritsukage-Core/Ritsukage-Core/Library/Service/TipMessageService.cs:line 34
at Ritsukage.QQ.Commands.TipMessage.TipRemove(SoraMessage e, Int32 id) in /home/ubuntu/project/Ritsukage-Core/Ritsukage-Core/QQ/Commands/TipMessage.cs:line 109
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
补充信息
Running on Linux VM-4-11-ubuntu 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
看返回类型不是Nullable我没敢动😭
模板注释和模板内容看的眼花缭乱 😨
其他的小issue合并一起提提算了
发现实际需要实现的内容较多,糊了点发现功能展开后,实在没时间技术写,先发个issue慢慢实现吧
User-Agent说明: https://github.com/bangumi/api/blob/master/docs-raw/user%20agent.md
可能的user-agent如下:
BAKAOLC/Ritsukage-Core/{VERSION} (https://github.com/BAKAOLC/Ritsukage-Core)
+tipcommand <时间> [间隔] [结束时间] -- 在时间之后每[间隔]时间直到[结束时间],输出以执行人权限执行command的结果。
可能的例子:
+tipcommand 2024-01-01T06:00 1D 2024-06-11T00:00 +高考倒计时
或应该等同于计划任务
+schedule <时间> [间隔] [结束时间] <command/lua_script_name/system command...> -- (superuser only的命令)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.