|
import { Sequelize } from 'sequelize'; |
|
|
import { Database as DB } from 'sqlite3'; |
|
1 |
import DiscordClient from './Client'; |
import DiscordClient from './Client'; |
2 |
import mongoose from "mongoose"; |
import mongoose from "mongoose"; |
3 |
|
|
4 |
export default class Database { |
export default class Database { |
5 |
client: DiscordClient; |
client: DiscordClient; |
|
dbpath: string; |
|
6 |
|
|
7 |
constructor(dbpath: string, client: DiscordClient) { |
constructor(client: DiscordClient) { |
8 |
this.client = client; |
this.client = client; |
|
this.dbpath = dbpath; |
|
9 |
|
|
10 |
mongoose.connect(process.env.MONGO_URI!) |
mongoose.connect(process.env.MONGO_URI!) |
11 |
.then(() => console.log("Connected to MongoDB")) |
.then(() => console.log("Connected to MongoDB")) |