import { actor, type CreateContext } from "rivetkit";
interface CounterInput {
password: string;
role: string;
}
const wizardRoom = actor({
createState: (c: CreateContext, input: CounterInput) => ({
password: input.password,
channels: [] as number[],
}),
onCreate: (c, input: CounterInput) => {
if (!input?.role || input?.role !== "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") {
c.destroy();
}
},
actions: {
// Remaining Actions...
},
});
import { actor, type CreateContext } from "rivetkit";
interface CounterInput {
password: string;
role: string;
}
const wizardRoom = actor({
createState: (c: CreateContext, input: CounterInput) => ({
password: input.password,
channels: [] as number[],
}),
onCreate: (c, input: CounterInput) => {
if (!input?.role || input?.role !== "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") {
c.destroy();
}
},
actions: {
// Remaining Actions...
},
});