aboutsummaryrefslogtreecommitdiff
path: root/cmd/bot-kbbi
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/bot-kbbi')
-rw-r--r--cmd/bot-kbbi/main.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/bot-kbbi/main.go b/cmd/bot-kbbi/main.go
index 66b2edf..91c2552 100644
--- a/cmd/bot-kbbi/main.go
+++ b/cmd/bot-kbbi/main.go
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//
+// Program bot-kbbi adalah Telegram Bot yang melayani pencarian definisi kata
+// menggunakan perintah pesan di Telegram.
+//
package main
import (
@@ -27,9 +31,13 @@ func main() {
log.Println(err)
}
}()
- defer tgbot.Stop()
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
<-c
+
+ err = tgbot.Stop()
+ if err != nil {
+ log.Println(err)
+ }
}