🏷️ Add types for actions
This commit is contained in:
7
src/interfaces/actions/Action.ts
Normal file
7
src/interfaces/actions/Action.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export interface Action {
|
||||||
|
type: string;
|
||||||
|
channelId: string;
|
||||||
|
userId: string;
|
||||||
|
scheduledAt?: number;
|
||||||
|
data: any;
|
||||||
|
}
|
8
src/interfaces/actions/BroadcastAction.ts
Normal file
8
src/interfaces/actions/BroadcastAction.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { Action } from "./Action";
|
||||||
|
|
||||||
|
export interface BroadcastAction extends Action {
|
||||||
|
type: "broadcast";
|
||||||
|
data: {
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
}
|
8
src/interfaces/actions/SayAction.ts
Normal file
8
src/interfaces/actions/SayAction.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { Action } from "./Action";
|
||||||
|
|
||||||
|
export interface SayAction extends Action {
|
||||||
|
type: "say";
|
||||||
|
data: {
|
||||||
|
message: "string";
|
||||||
|
}
|
||||||
|
}
|
10
src/interfaces/actions/TimeoutAction.ts
Normal file
10
src/interfaces/actions/TimeoutAction.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { Action } from "./Action";
|
||||||
|
|
||||||
|
export interface TimeoutAction extends Action {
|
||||||
|
type: "timeout";
|
||||||
|
data: {
|
||||||
|
username: string;
|
||||||
|
time: number;
|
||||||
|
reason?: string;
|
||||||
|
}
|
||||||
|
}
|
6
src/interfaces/actions/VipAction.ts
Normal file
6
src/interfaces/actions/VipAction.ts
Normal file
@@ -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