Add API call for dispatching commands

Add Plugin for tab-to-reply command
This commit is contained in:
Ceikry 2022-09-26 14:48:09 -05:00
parent b073365cd4
commit 7a7be2a54b
3 changed files with 33 additions and 2 deletions

View file

@ -0,0 +1,23 @@
package TabReply
import plugin.Plugin
import plugin.annotations.PluginMeta
import plugin.api.API
import java.awt.event.KeyAdapter
import java.awt.event.KeyEvent
@PluginMeta (
author = "Ceikry",
description = "Allows you to press tab to reply to DMs.",
version = 1.0
)
class plugin : Plugin() {
override fun Init() {
API.AddKeyboardListener(object : KeyAdapter() {
override fun keyPressed(e: KeyEvent) {
if (e.keyCode == KeyEvent.VK_TAB)
API.DispatchCommand("::reply")
}
})
}
}