feat: add nwwn command
This commit is contained in:
1 file changed
+2
-2
@@ -21,13 +21,13 @@ import javax.imageio.ImageIO
|
|||||||
@CommandDescription("那我问你")
|
@CommandDescription("那我问你")
|
||||||
class NWWNCommand : BaseCommand() {
|
class NWWNCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("nwwn", "那我问你")
|
override val commandNames = listOf("nwwn", "那我问你")
|
||||||
private val originNWWNImage = Resources.loadFromResources("misc/nwwn.png")
|
private val originNWWNImage = Resources.loadFromResourcesAsBytes("misc/nwwn.png")
|
||||||
private val img = ImageIO.read(originNWWNImage)
|
|
||||||
private val font = Font("Serif", Font.ITALIC, 55)
|
private val font = Font("Serif", Font.ITALIC, 55)
|
||||||
|
|
||||||
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
try {
|
try {
|
||||||
val keyword = args.first()
|
val keyword = args.first()
|
||||||
|
val img = ImageIO.read(originNWWNImage!!.inputStream())
|
||||||
val g2d = img.createGraphics()
|
val g2d = img.createGraphics()
|
||||||
g2d.color = Color.BLACK
|
g2d.color = Color.BLACK
|
||||||
g2d.font = font
|
g2d.font = font
|
||||||
|
|||||||
Reference in New Issue
Block a user