43 lines
No EOL
1.2 KiB
TypeScript
43 lines
No EOL
1.2 KiB
TypeScript
import { GatewayIntentBits, Client } from "npm:discord.js";
|
|
import { Command } from "./types.ts";
|
|
|
|
// class Store<T> {
|
|
// value: T
|
|
// constructor(defaultValue:T) {
|
|
// this.value = defaultValue
|
|
// }
|
|
// get() {
|
|
// return this.value
|
|
// }
|
|
// set(newValue: T) {
|
|
// this.value = newValue
|
|
// }
|
|
// }
|
|
|
|
// class ListStore<T> extends Store<T[]> {
|
|
// constructor(defaultValue: T[]){
|
|
// super(defaultValue)
|
|
// }
|
|
// push() {
|
|
// this.value.push()
|
|
// }
|
|
// }
|
|
|
|
// class ObjectStore<T> extends Store<{[index: string | number | symbol]: T}> {
|
|
// constructor(defaultValue: {[index in string | number | symbol]: T}){
|
|
// super(defaultValue)
|
|
// }
|
|
// getProperty(index: string | number | symbol) {
|
|
// return this.value[index]
|
|
// }
|
|
// setProperty(index: string | number | symbol, newValue: T) {
|
|
// this.value[index] = newValue
|
|
// }
|
|
// }
|
|
|
|
|
|
export const client = new Client({
|
|
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent],
|
|
});
|
|
export const commands: {[index:string]:Command} = {}
|
|
export const settings = {textChannelId: "", voiceChannelId: "", characterId: ""} |