From 1dc4581926aa3768075b24ad2529c9e65e8d6c2f Mon Sep 17 00:00:00 2001 From: Tony Zou Date: Fri, 4 Oct 2019 22:20:21 +0800 Subject: [PATCH] fix: type --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 6783931..48c2f71 100644 --- a/main.go +++ b/main.go @@ -37,7 +37,7 @@ func (s *CrispMessageInfo) UnmarshalBinary(data []byte) error { func contains(s []interface{}, e int64) bool { for _, a := range s { - if a == e { + if int64(a.(int)) == e { return true } } @@ -83,7 +83,7 @@ func replyToUser(update *tgbotapi.Update) { func sendMsgToAdmins(text string, WebsiteID string, SessionID string) { for _, id := range config.Get("admins").([]interface{}) { - msg := tgbotapi.NewMessage(id.(int64), text) + msg := tgbotapi.NewMessage(int64(id.(int)), text) msg.ParseMode = "Markdown" sent, _ := bot.Send(msg)