Initial commit

This commit is contained in:
Alois 2026-03-10 20:44:25 +01:00
commit 2f5e10140c
133 changed files with 10429 additions and 0 deletions

View file

@ -0,0 +1,3 @@
export function getMessages() {
return 0;
}

View file

@ -0,0 +1,22 @@
import { useSocket } from "@tensamin/ttp/context";
import type { RawMessages } from "../values";
export async function getMessages(
amount: number,
offset: number,
user_id: number,
): Promise<RawMessages> {
const { send } = useSocket();
const messages = await send("messages_get", {
amount: amount,
offset: offset,
user_id: user_id,
});
if (messages.type.startsWith("error")) {
throw new Error(messages.type);
}
return messages.data.messages;
}