mjs -> cjs

This commit is contained in:
Isaac
2022-05-05 21:29:28 +01:00
parent 9cdd3f92e5
commit cbfbf05e8c
9 changed files with 72 additions and 70 deletions

24
src/client.js Normal file
View File

@@ -0,0 +1,24 @@
const { Client: FrameworkClient }= require('@eartharoid/dbf');
const { Intents } = require('discord.js');
const prisma = require('@prisma/client');
module.exports = class Client extends FrameworkClient {
constructor() {
super({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_MESSAGES,
],
});
}
async login(token) {
this.prisma = new prisma.PrismaClient();
return super.login(token);
}
async destroy() {
await this.prisma.$disconnect();
return super.destroy();
}
};