tigerbeanst / luoxu-bot Goto Github PK
View Code? Open in Web Editor NEWA Telegram bot to index Chinese and Japanese group contents, works with @lilydjwg/luoxu.
A Telegram bot to index Chinese and Japanese group contents, works with @lilydjwg/luoxu.
感谢回复,我将邮箱编辑掉。抱歉打扰
已经搭建好luoxu和luoxu-bot,测试web版本功能正常,bot输入/list可以返回正确的索引列表
当输入搜索内容时,若搜索内容为中文,报错:
com.alibaba.fastjson2.JSONException: illegal fieldName inputI, offset 1, character I, line 1, column 2, fastjson-version 2.0.17 Invalid char in url query:
b'GET /luoxu/search?q=\xe6\xb5\x8b\xe8\xaf\x95&g=1317151537 HTTP/1.1'
^
at com.alibaba.fastjson2.JSONReaderASCII.readFieldNameHashCode(JSONReaderASCII.java:136)
at com.alibaba.fastjson2.reader.ObjectReaderNoneDefaultConstructor.readObject(ObjectReaderNoneDefaultConstructor.java:223)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:600)
at methods.AfterSearchKt.afterSearch(afterSearch.kt:77)
at MainKt$main$bot$1$1$3.invoke(Main.kt:21)
at MainKt$main$bot$1$1$3.invoke(Main.kt:21)
at com.github.kotlintelegrambot.dispatcher.handlers.CallbackQueryHandler.handleUpdate(CallbackQueryHandler.kt:38)
at com.github.kotlintelegrambot.dispatcher.Dispatcher.handleUpdate(Dispatcher.kt:66)
at com.github.kotlintelegrambot.dispatcher.Dispatcher.checkQueueUpdates(Dispatcher.kt:35)
at com.github.kotlintelegrambot.dispatcher.Dispatcher.startCheckingUpdates$lambda-0(Dispatcher.kt:28)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
若搜索内容为英文,报错:
java.lang.StringIndexOutOfBoundsException: begin -189, end 187, length 1669
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
at java.base/java.lang.String.substring(String.java:1874)
at BotUtilsKt.highlight(BotUtils.kt:144)
at BotUtilsKt.highlight$default(BotUtils.kt:128)
at methods.AfterSearchKt.afterSearch(afterSearch.kt:57)
at MainKt$main$bot$1$1$3.invoke(Main.kt:21)
at MainKt$main$bot$1$1$3.invoke(Main.kt:21)
at com.github.kotlintelegrambot.dispatcher.handlers.CallbackQueryHandler.handleUpdate(CallbackQueryHandler.kt:38)
at com.github.kotlintelegrambot.dispatcher.Dispatcher.handleUpdate(Dispatcher.kt:66)
at com.github.kotlintelegrambot.dispatcher.Dispatcher.checkQueueUpdates(Dispatcher.kt:35)
at com.github.kotlintelegrambot.dispatcher.Dispatcher.startCheckingUpdates$lambda-0(Dispatcher.kt:28)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
May 17, 2024 6:19:02 AM okhttp3.internal.platform.Platform log
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.