feat: add compiler and format class dir

This commit is contained in:
2024-09-13 12:44:10 +08:00
parent d286613f01
commit 882a9f50ff
23 files changed
+128 -68

No files matched your search

@@ -0,0 +1,27 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/9/6
*/
package cn.rtast.fancybot.commands.lookup
import cn.rtast.rob.entity.GroupMessage
import cn.rtast.rob.util.BaseCommand
import cn.rtast.rob.util.ob.MessageChain
import cn.rtast.rob.util.ob.OBMessage
import java.net.InetAddress
class NslookupCommand : BaseCommand() {
override val commandNames = listOf("/nslookup", "/ns")
override suspend fun executeGroup(listener: OBMessage, message: GroupMessage, args: List<String>) {
val msg = MessageChain.Builder()
.addReply(message.messageId)
.addText("域名: ${args.first()}解析后的IP地址为: ")
.addText(InetAddress.getByName(args.first()).hostAddress)
.build()
listener.sendGroupMessage(message.groupId, msg)
}
}