func main() { flag.Parse() f := finch.NewFinch(*apiToken) f.Start() }
func main() { db := sqlx.MustOpen("sqlite3", os.Getenv("DATABASE_PATH")) database.DB = db db.MustExec(` create table if not exists user ( id integer primary key, telegram_id integer not null, name text ); create table if not exists selection ( id integer primary key, user_id integer not null, chat_id integer not null, title text, active integer ); create table if not exists selection_item ( id integer primary key, selection_id integer not null, item text not null ); create table if not exists selection_vote ( id integer primary key, user_id integer not null, selection_id integer not null, selection_item_id integer not null ); `) f := finch.NewFinch(os.Getenv("TELEGRAM_APITOKEN")) f.API.Debug = os.Getenv("DEBUG") == "true" f.Start() }
func main() { f := finch.NewFinch(os.Getenv("TELEGRAM_APITOKEN")) f.Start() }