1 |
|
import DiscordClient from "../client/Client"; |
2 |
import KeyValuePair from "../types/KeyValuePair"; |
import KeyValuePair from "../types/KeyValuePair"; |
3 |
import Response from "./Response"; |
import Response from "./Response"; |
4 |
|
|
5 |
export default class Controller { |
export default class Controller { |
6 |
constructor() { |
constructor(protected client: DiscordClient) { |
7 |
console.log("Constructor call"); |
console.log("Constructor call"); |
8 |
} |
} |
9 |
|
|
10 |
protected response(body: string, status: number = 200, headers: KeyValuePair<string> = {}) { |
protected response(body: string | object | null | undefined, status: number = 200, headers: KeyValuePair<string> = {}) { |
11 |
return new Response(status, body, headers); |
return new Response(status, body, headers); |
12 |
} |
} |
13 |
|
|