detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
50 lines (49 loc) • 1.12 kB
TypeScript
import { ClusterIPCOpCodes, SocketStates } from '../constants';
export declare namespace ClusterIPCTypes {
interface IPCMessage {
op: ClusterIPCOpCodes;
data: any;
request: boolean;
clusterId?: number;
shard?: number;
}
interface Close {
code: number;
reason: string;
shardId: number;
}
interface Eval {
error?: {
message: string;
name: string;
stack: string;
};
code: string;
ignored?: boolean;
nonce: string;
result?: any;
results?: Array<[any, boolean]>;
}
interface FillInteractionCommands {
data: Array<any>;
}
interface IdentifyRequest {
shardId: number;
}
interface RestRequest {
data?: any;
error?: {
message: string;
name: string;
stack: string;
};
result?: any;
args?: Array<any>;
hash: string;
name: string;
}
interface ShardState {
shardId: number;
state: SocketStates;
}
}