summaryrefslogtreecommitdiff
path: root/duck.go
diff options
context:
space:
mode:
Diffstat (limited to 'duck.go')
-rw-r--r--duck.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/duck.go b/duck.go
index c3df947..1d126e1 100644
--- a/duck.go
+++ b/duck.go
@@ -10,6 +10,7 @@ import (
type Duck struct{ Command }
func (_ Duck) WithArgs(_ int) bool { return true }
+
func (_ Duck) Handle(conn *irc.Conn, line *irc.Line) {
if q := strings.SplitN(line.Text(), " ", 2); len(q) == 2 {
if a, err := duck.Abstract(q[1]); err != nil {
@@ -20,10 +21,10 @@ func (_ Duck) Handle(conn *irc.Conn, line *irc.Line) {
}
}
+func (_ Duck) Help() string {
+ return "Perform nuckduckgo instant answer search"
+}
+
func init() {
- Register("define", &Duck{
- Command{
- Help: "Perform duckduckgo instant answer search",
- },
- })
+ Register("define", &Duck{})
}