1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-19 04:50:02 +02:00

Move internal packages into internal subdirectory

This commit is contained in:
Henrik Hautakoski 2022-11-29 15:08:23 +01:00
parent 770f0a48ef
commit ddd5d67901
8 changed files with 6 additions and 6 deletions

View file

@ -1,30 +0,0 @@
package telegram
import (
"fmt"
_api "github.com/go-telegram-bot-api/telegram-bot-api/v5"
)
var (
_bot *_api.BotAPI
_channel int64
_prefix string
)
func Init(prefix string, id string, channel int64) error {
var err error
_bot, err = _api.NewBotAPI(id)
if err == nil {
_prefix = prefix
_channel = channel
}
return err
}
func Send(message string) error {
msg := _api.NewMessage(_channel, fmt.Sprintf("%s: %s", _prefix, message))
_, err := _bot.Send(msg)
return err
}