import { MongoClient } from "mongodb";

const mongoClient = new MongoClient("mongodb://127.0.0.1:27017/local");
await mongoClient.connect();
const database = mongoClient.db("Nucleus");
const collection = database.collection("history");

for (let i = 0; i < 100; i++) {
    // Select a type
    let type = [
        "join",
        "unban",
        "leave",
        "ban",
        "softban",
        "kick",
        "mute",
        "purge",
        "warn",
        "nickname"
    ][Math.floor(Math.random() * 9)];
    // Select a random date in the last year
    let date = new Date(
        new Date().getTime() - Math.floor(Math.random() * 31536000000)
    );
    // Add to database
    await collection.insertOne({
        type: type,
        occurredAt: date,
        user: "438733159748599813",
        guild: "864185037078790195",
        moderator: [
            "unban",
            "ban",
            "softban",
            "kick",
            "mute",
            "purge",
            "warn"
        ].includes(type)
            ? "438733159748599813"
            : null,
        reason: [
            "unban",
            "ban",
            "softban",
            "kick",
            "mute",
            "purge",
            "warn"
        ].includes(type)
            ? "Test"
            : null,
        before: type === "nickname" ? "TestBefore" : null,
        after: type === "nickname" ? "TestAfter" : null,
        amount: type === "purge" ? Math.floor(Math.random() * 100) : null
    });
    console.log("Inserted document " + i);
}
