mirror of https://github.com/velour/catbase.git
Compare commits
3 Commits
30f3c26dd2
...
5df7644229
Author | SHA1 | Date |
---|---|---|
Chris Sexton | 5df7644229 | |
Chris Sexton | 4b95e7680c | |
Chris Sexton | 696ca8408d |
|
@ -18,10 +18,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (b *bot) Receive(conn Connector, kind Kind, msg msg.Message, args ...interface{}) bool {
|
func (b *bot) Receive(conn Connector, kind Kind, msg msg.Message, args ...interface{}) bool {
|
||||||
log.Debug().
|
|
||||||
Interface("msg", msg).
|
|
||||||
Msg("Received event")
|
|
||||||
|
|
||||||
// msg := b.buildMessage(client, inMsg)
|
// msg := b.buildMessage(client, inMsg)
|
||||||
// do need to look up user and fix it
|
// do need to look up user and fix it
|
||||||
if kind == Message && strings.HasPrefix(msg.Body, "help") && msg.Command {
|
if kind == Message && strings.HasPrefix(msg.Body, "help") && msg.Command {
|
||||||
|
|
|
@ -192,7 +192,6 @@ func (d *Discord) Serve() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Discord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
func (d *Discord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||||
log.Debug().Msgf("discord message: %+v", m)
|
|
||||||
if m.Author.ID == s.State.User.ID {
|
if m.Author.ID == s.State.User.ID {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -216,7 +215,5 @@ func (d *Discord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreate
|
||||||
Time: tStamp,
|
Time: tStamp,
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug().Interface("m", m).Interface("msg", msg).Msg("message received")
|
|
||||||
|
|
||||||
d.event(d, bot.Message, msg)
|
d.event(d, bot.Message, msg)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue