feat: add minecraft wiki content query
This commit is contained in:
6 files changed
+112
-25
No files matched your search
@@ -25,9 +25,11 @@ class WikipediaCommand : BaseCommand() {
|
||||
|
||||
private val wikipediaAPI = "https://proxy.rtast.cn/https/zh.wikipedia.org/w/api.php"
|
||||
|
||||
private fun String.extractPlainTextFromHtml(): String {
|
||||
val doc = Jsoup.parse(this)
|
||||
return doc.text()
|
||||
companion object {
|
||||
fun String.extractPlainTextFromHtml(): String {
|
||||
val doc = Jsoup.parse(this)
|
||||
return doc.text()
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
||||
|
||||
Reference in New Issue
Block a user