2021-06-03 13:45:07 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "github.com/bwmarrin/discordgo"
|
|
|
|
|
|
|
|
func (app *application) LogToConsole(next Command) Command {
|
|
|
|
fn := func(s *discordgo.Session, m *discordgo.MessageCreate) {
|
2021-06-03 14:07:11 +02:00
|
|
|
app.infoLog.Printf("%s \tsaid: %s\n", m.Author.Username, m.Content)
|
2021-06-03 13:45:07 +02:00
|
|
|
next.Execute(s, m)
|
|
|
|
}
|
|
|
|
return HandlerFunc(fn)
|
|
|
|
}
|