Add guild routes, setup tables, validators, and update environment example
All checks were successful
Code quality checks / biome (push) Successful in 7s
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
This commit is contained in:
parent
9d8b3eb969
commit
320e2cc121
14 changed files with 708 additions and 24 deletions
20
config/setup/tables/guilds/invites.ts
Normal file
20
config/setup/tables/guilds/invites.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
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 };
|
Loading…
Add table
Add a link
Reference in a new issue