Skip to content

OsirisFrik/timmy-old

Repository files navigation

Timmy

build This is a discord bot to random features...

Install

yarn install
## or
npm install

ENV

PORT =
NODE_ENV =
DATABASE =
BUCKET =
GOOGLE_APPLICATION_CREDENTIALS =
DISCORD =

Run

dev

yarn dev
## or
npm run dev

prod

yarn start
## or
npm start

test

yarn test
## or
npm run test

Add module

Create file in bot/modules/<name>.ts

structure

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> {
    ...
  }
}