func main() { brokerAddr := flag.String("broker", "localhost:7314", "Broker address:port") delay := flag.Int64("delau", 10, "How many seconds between each poll") flag.Parse() lastPage = "" apichat = make(map[int]*tg.APIChat) go startPolling(*delay) err := tg.CreateBrokerClient(*brokerAddr, process) assert(err) }
func main() { brokerAddr := flag.String("broker", "localhost:7314", "Broker address:port") botname = flag.String("botname", "maudbot", "Bot name for /targetet@commands") impact = flag.String("impact", "impact.ttf", "Path to impact.ttf (Impact font)") gillmt = flag.String("gillmt", "gill.ttf", "Path to gill.ttf (Gill Sans MT font)") flag.Parse() initmods() err := tg.CreateBrokerClient(*brokerAddr, dispatch) if err != nil { panic(err) } }
func main() { brokerAddr := flag.String("broker", "localhost:7314", "Broker address:port") webBind := flag.String("webserver", "localhost:7315", "Address to bind webserver to") boltdbFile := flag.String("boltdb", "stats.db", "BoltDB database file") chatID = flag.Int64("chatid", -14625256, "Telegram Chat ID to count stats for") flag.Parse() var err error db, err = bolt.Open(*boltdbFile, 0600, nil) assert(err) defer db.Close() loadUsers() loadStats() go startWebServer(*webBind) err = tg.CreateBrokerClient(*brokerAddr, process) assert(err) }