2019-05-10 09:55:52 +00:00
|
|
|
package discord
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/bwmarrin/discordgo"
|
|
|
|
)
|
|
|
|
|
|
|
|
type testHandler struct{}
|
|
|
|
|
2019-05-10 12:16:35 +00:00
|
|
|
var _ = testHandler{} // ignore unused warning
|
2019-05-10 09:55:52 +00:00
|
|
|
|
2019-05-10 12:16:35 +00:00
|
|
|
func (h *testHandler) Signature() string {
|
2019-05-10 09:55:52 +00:00
|
|
|
return "!test"
|
|
|
|
}
|
|
|
|
|
2019-05-10 12:16:35 +00:00
|
|
|
func (h *testHandler) Description() string {
|
2019-05-10 09:55:52 +00:00
|
|
|
return "тестовый хэндлер"
|
|
|
|
}
|
|
|
|
|
2019-05-10 12:16:35 +00:00
|
|
|
func (h *testHandler) IsValid(msg string) bool {
|
2019-05-10 09:55:52 +00:00
|
|
|
return msg == "!test"
|
|
|
|
}
|
|
|
|
|
2019-05-10 12:16:35 +00:00
|
|
|
func (h *testHandler) Handle(s *discordgo.Session, m *discordgo.MessageCreate) {
|
2019-05-10 09:55:52 +00:00
|
|
|
LogMessage(m)
|
|
|
|
}
|