upgrade
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"tg-mc/conf"
|
||||
|
||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||
"github.com/samber/lo"
|
||||
)
|
||||
|
||||
func SendMsg(msg string) error {
|
||||
@@ -11,3 +12,8 @@ func SendMsg(msg string) error {
|
||||
_, err := conf.Bot.Send(msgT)
|
||||
return err
|
||||
}
|
||||
|
||||
func IsAdmin(m *tgbotapi.Message) bool {
|
||||
return lo.Contains(conf.GetBotSettings().AdminID, m.From.ID) ||
|
||||
lo.Contains(conf.GetBotSettings().AdminID, m.Chat.ID)
|
||||
}
|
||||
|
Reference in New Issue
Block a user