From 3cd8db5ebc83fd31dd831605bc347dedbc2f9367 Mon Sep 17 00:00:00 2001 From: TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> Date: Tue, 11 May 2021 22:55:26 -0600 Subject: set up db for leveling --- src/lib/extensions/BotClient.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/lib/extensions/BotClient.ts') diff --git a/src/lib/extensions/BotClient.ts b/src/lib/extensions/BotClient.ts index 547d0eb..7ac0051 100644 --- a/src/lib/extensions/BotClient.ts +++ b/src/lib/extensions/BotClient.ts @@ -243,6 +243,21 @@ export class BotClient extends AkairoClient { }, { sequelize: this.db } ); + Models.Level.init( + { + id: { + type: DataTypes.STRING, + primaryKey: true, + allowNull: false + }, + xp: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: 0 + } + }, + { sequelize: this.db } + ); try { await this.db.sync({ alter: true }); // Sync all tables to fix everything if updated } catch { -- cgit