diff options
| author | Shulhan <m.shulhan@gmail.com> | 2020-05-30 03:26:34 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2020-05-30 03:26:34 +0700 |
| commit | 734ce643ecbc992834a8f78b44904b82b09bc84b (patch) | |
| tree | d67aec8f6e0fe922e3bb6c7abc91fb8ad30ee9e7 /telegram_bot.go | |
| parent | 6b03e4fd9670f865216a773545ea4a0bbf534582 (diff) | |
| download | kamusku-734ce643ecbc992834a8f78b44904b82b09bc84b.tar.xz | |
all: rename the module to "kamusku"
Diffstat (limited to 'telegram_bot.go')
| -rw-r--r-- | telegram_bot.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/telegram_bot.go b/telegram_bot.go index 71adb94..061bb4c 100644 --- a/telegram_bot.go +++ b/telegram_bot.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package kbbi +package kamusku import ( "bytes" @@ -150,6 +150,20 @@ func (tgbot *TelegramBot) sendError(msg *bot.Message, parseMode, errMsg string) } } +//nolint: unused +func (tgbot *TelegramBot) sendShutdownNotice(msg *bot.Message) { + text := `Mohon maaf, KamuskuBot untuk sementara berhenti beroperasi dulu karena masalah legalitas. + +Kami sedang memperbarui kanal kamus ke id.wiktionary.org, yang lebih terbuka +dan bebas dipakai oleh publik. +` + _, err := tgbot.SendMessage(msg, "", text) + if err != nil { + log.Printf("sendShutdownNotice: %s", err) + return + } +} + func formatText(definisiKata DefinisiResponse) string { buf := &bytes.Buffer{} for k, kata := range definisiKata { |
