1
0

🏷️ Add types for actions

This commit is contained in:
2021-12-26 01:12:22 +01:00
parent 71f7546165
commit ca34a6a090
5 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
export interface Action {
type: string;
channelId: string;
userId: string;
scheduledAt?: number;
data: any;
}

View File

@@ -0,0 +1,8 @@
import { Action } from "./Action";
export interface BroadcastAction extends Action {
type: "broadcast";
data: {
message: string;
}
}

View File

@@ -0,0 +1,8 @@
import { Action } from "./Action";
export interface SayAction extends Action {
type: "say";
data: {
message: "string";
}
}

View File

@@ -0,0 +1,10 @@
import { Action } from "./Action";
export interface TimeoutAction extends Action {
type: "timeout";
data: {
username: string;
time: number;
reason?: string;
}
}

View File

@@ -0,0 +1,6 @@
import { Action } from "./Action";
export interface VipAction extends Action {
type: "addVip" | "removeVip";
data: undefined;
}