package main

import (
	"database/sql"
	"flag"
	"os"

	_ "github.com/mattn/go-sqlite3"
	"maunium.net/go/mautrix"
)

var (
	homeserver  = flag.String("homeserver", "matrix.skyforge.at", "Matrix Homeserver to connect to")
	userID      = flag.String("user", "", "User ID")
	accessToken = flag.String("password", "", "Access Token")
)

func main() {
	flag.Parse()

	if *userID == "" || *accessToken == "" {
		flag.PrintDefaults()
		os.Exit(1)
	}

	db, err := sql.Open("sqlite3", "./history.db")
	if err != nil {
		panic(err)
	}
	defer db.Close()

	client, err := mautrix.NewClient(*homeserver, *userID, *accessToken)
	if err != nil {
		panic(err)
	}
}