All checks were successful
Code quality checks / biome (push) Successful in 7s
Added routes for guild creation, deletion, joining, leaving, and invites Set up Cassandra tables for guilds, invites, and members Added validators for guild input Updated .env.example with required config values
20 lines
395 B
TypeScript
20 lines
395 B
TypeScript
import { cassandra } from "@lib/cassandra";
|
|
|
|
async function createTable() {
|
|
const client = cassandra.getClient();
|
|
|
|
await client.execute(`
|
|
CREATE TABLE IF NOT EXISTS guild_invites (
|
|
invite_code TEXT PRIMARY KEY,
|
|
guild_id TEXT,
|
|
created_by TEXT,
|
|
created_at TIMESTAMP,
|
|
expires_at TIMESTAMP,
|
|
max_uses INT,
|
|
uses INT,
|
|
is_revoked BOOLEAN
|
|
);
|
|
`);
|
|
}
|
|
|
|
export { createTable };
|