feat: add nwwn command

This commit is contained in:
2025-01-15 00:27:37 +08:00
parent 5584b18f2f
commit 7f199959f1
1 file changed
+2 -2
@@ -21,13 +21,13 @@ import javax.imageio.ImageIO
@CommandDescription("那我问你")
class NWWNCommand : BaseCommand() {
override val commandNames = listOf("nwwn", "那我问你")
private val originNWWNImage = Resources.loadFromResources("misc/nwwn.png")
private val img = ImageIO.read(originNWWNImage)
private val originNWWNImage = Resources.loadFromResourcesAsBytes("misc/nwwn.png")
private val font = Font("Serif", Font.ITALIC, 55)
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
try {
val keyword = args.first()
val img = ImageIO.read(originNWWNImage!!.inputStream())
val g2d = img.createGraphics()
g2d.color = Color.BLACK
g2d.font = font