feat: export guilds from old bot and import into new one

This commit is contained in:
sam 2024-10-24 23:35:44 +02:00
parent 301744dd4e
commit 9302ba200f
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
10 changed files with 1326 additions and 0 deletions

27
go-exporter/main.go Normal file
View file

@ -0,0 +1,27 @@
package main
import (
"context"
"log"
"os"
"github.com/jackc/pgx/v4/pgxpool"
)
var conn *pgxpool.Pool
var ctx = context.Background()
func main() {
dsn := os.Getenv("DATABASE_URL")
pool, err := pgxpool.Connect(ctx, dsn)
if err != nil {
log.Fatalf("error connecting to db: %v\n", err)
}
conn = pool
err = exportGuilds()
if err != nil {
log.Fatalf("error exporting guilds: %v\n", err)
}
}