🏷️ Add types for actions
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
export interface Action {
|
||||||
|
type: string;
|
||||||
|
channelId: string;
|
||||||
|
userId: string;
|
||||||
|
scheduledAt?: number;
|
||||||
|
data: any;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { Action } from "./Action";
|
||||||
|
|
||||||
|
export interface BroadcastAction extends Action {
|
||||||
|
type: "broadcast";
|
||||||
|
data: {
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { Action } from "./Action";
|
||||||
|
|
||||||
|
export interface SayAction extends Action {
|
||||||
|
type: "say";
|
||||||
|
data: {
|
||||||
|
message: "string";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { Action } from "./Action";
|
||||||
|
|
||||||
|
export interface TimeoutAction extends Action {
|
||||||
|
type: "timeout";
|
||||||
|
data: {
|
||||||
|
username: string;
|
||||||
|
time: number;
|
||||||
|
reason?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { Action } from "./Action";
|
||||||
|
|
||||||
|
export interface VipAction extends Action {
|
||||||
|
type: "addVip" | "removeVip";
|
||||||
|
data: undefined;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user