edit: db path
This commit is contained in:
parent
7250a6ddb5
commit
8d1b44a82a
2 changed files with 6 additions and 5 deletions
2
example.env
Normal file
2
example.env
Normal file
|
@ -0,0 +1,2 @@
|
|||
DISCORD_TOKEN='BOT_TOKEN'
|
||||
DB_PATH='DB_PATH'
|
|
@ -1,5 +1,5 @@
|
|||
import type { Client, Message } from 'discord.js'
|
||||
import { join } from 'node:path'
|
||||
// import { join } from 'node:path'
|
||||
import Database from './Database'
|
||||
|
||||
type TrainType = 'muffinOnly' | 'All'
|
||||
|
@ -12,9 +12,8 @@ export default class ChatBot {
|
|||
set trainType(value: TrainType) {
|
||||
this._trainType = value
|
||||
}
|
||||
public db = new Database(join(__dirname, '..', 'db', 'db.sqlite3'))
|
||||
public db = new Database(process.env.DB_PATH!)
|
||||
private _trainType: TrainType = 'All'
|
||||
public constructor() {}
|
||||
|
||||
public getResponse(msg: Message, sendMsg?: boolean): ChatBot {
|
||||
this.db
|
||||
|
|
Loading…
Reference in a new issue