This commit is contained in:
shoopea 2020-01-14 10:38:42 +08:00
parent 80a86a1c6e
commit 817b086738
2 changed files with 4 additions and 3 deletions

View File

@ -5,13 +5,11 @@ package main
import ( import (
"database/sql" "database/sql"
"flag" "flag"
"fmt"
"log" "log"
"math/rand" "math/rand"
"sync" "sync"
"time" "time"
"gopkg.in/gcfg.v1"
//"github.com/robfig/cron/v3" //"github.com/robfig/cron/v3"
"gopkg.in/robfig/cron.v3" "gopkg.in/robfig/cron.v3"

View File

@ -1,11 +1,14 @@
package main package main
import ( import (
"encoding/json"
"errors" "errors"
"log" "log"
"regexp" "regexp"
"strconv" "strconv"
"time" "time"
tb "gopkg.in/tucnak/telebot.v2"
) )
func failOnError(err error, msg string) { func failOnError(err error, msg string) {
@ -37,7 +40,7 @@ func MaxInt(a int, b int) int {
} }
func PrintText(m *tb.Message) { func PrintText(m *tb.Message) {
fmt.Printf("[%d] %s(%d) | %s(%d) : %s\n", m.ID, m.Chat.Title, m.Chat.ID, m.Sender.Username, m.Sender.ID, m.Text) log.Printf("[%d] %s(%d) | %s(%d) : %s\n", m.ID, m.Chat.Title, m.Chat.ID, m.Sender.Username, m.Sender.ID, m.Text)
return return
} }