aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/BotClient.ts
diff options
context:
space:
mode:
authorTymanWasTaken <32660892+tymanwastaken@users.noreply.github.com>2021-05-11 22:55:26 -0600
committerTymanWasTaken <32660892+tymanwastaken@users.noreply.github.com>2021-05-11 22:55:26 -0600
commit3cd8db5ebc83fd31dd831605bc347dedbc2f9367 (patch)
treecd6d710f7effb1d75ec48edf52d460da7a34a9eb /src/lib/extensions/BotClient.ts
parent31764f52541a0566f148fb70c1a0e02c99bb5099 (diff)
downloadtanzanite-3cd8db5ebc83fd31dd831605bc347dedbc2f9367.tar.gz
tanzanite-3cd8db5ebc83fd31dd831605bc347dedbc2f9367.tar.bz2
tanzanite-3cd8db5ebc83fd31dd831605bc347dedbc2f9367.zip
set up db for leveling
Diffstat (limited to 'src/lib/extensions/BotClient.ts')
-rw-r--r--src/lib/extensions/BotClient.ts15
1 files changed, 15 insertions, 0 deletions
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 {