comments
This commit is contained in:
parent
542cff2044
commit
059fa78e32
4
main.go
4
main.go
@ -43,7 +43,7 @@ func contains(s []interface{}, e int64) bool {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
//from tg to crisp
|
||||||
func replyToUser(update *tgbotapi.Update) {
|
func replyToUser(update *tgbotapi.Update) {
|
||||||
if update.Message.ReplyToMessage == nil {
|
if update.Message.ReplyToMessage == nil {
|
||||||
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "请回复一个消息")
|
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "请回复一个消息")
|
||||||
@ -80,7 +80,7 @@ func replyToUser(update *tgbotapi.Update) {
|
|||||||
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "回复成功!")
|
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "回复成功!")
|
||||||
bot.Send(msg)
|
bot.Send(msg)
|
||||||
}
|
}
|
||||||
|
//from crisp to tg
|
||||||
func sendMsgToAdmins(text string, WebsiteID string, SessionID string) {
|
func sendMsgToAdmins(text string, WebsiteID string, SessionID string) {
|
||||||
for _, id := range config.Get("admins").([]interface{}) {
|
for _, id := range config.Get("admins").([]interface{}) {
|
||||||
msg := tgbotapi.NewMessage(int64(id.(int)), text)
|
msg := tgbotapi.NewMessage(int64(id.(int)), text)
|
||||||
|
Loading…
Reference in New Issue
Block a user