This is a discord bot to random features...
yarn install
## or
npm install
PORT =
NODE_ENV =
DATABASE =
BUCKET =
GOOGLE_APPLICATION_CREDENTIALS =
DISCORD =
yarn dev
## or
npm run dev
yarn start
## or
npm start
yarn test
## or
npm run test
Create file in bot/modules/<name>.ts
import { Client, Message } from 'discord.js'
import MainBot from '../main'
class ModuleName extends MainBot {
public commands: string[] = [
'$$example',
...
]
constructor(client: Client) {
super(client)
this.client.on('ready', () => this.init())
}
async init(): Promise<void> {
...
}
$$example(message: Message): Promise<void> {
...
}
}