clean up: using unprotected sqlite database

This commit is contained in:
Baipyrus 2024-01-29 14:59:52 +01:00
parent ae8562c536
commit 7026ed56a8
3 changed files with 3 additions and 6 deletions

View File

@ -1,6 +1,3 @@
TOKEN= TOKEN=
CLIENT= CLIENT=
DB_PWD=
DB_NAME= DB_NAME=
DB_HOST=
DB_USER=

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ node_modules
.env.* .env.*
!.env.example !.env.example
commands/examples commands/examples
*.sqlite

View File

@ -5,12 +5,11 @@ import { Sequelize } from 'sequelize';
import { config } from 'dotenv'; import { config } from 'dotenv';
config(); config();
const { DB_NAME, DB_USER, DB_PWD, DB_HOST } = process.env; const { DB_NAME } = process.env;
const sequelize = new Sequelize(DB_NAME, DB_USER, DB_PWD, { const sequelize = new Sequelize({
storage: `${DB_NAME}.sqlite`, storage: `${DB_NAME}.sqlite`,
dialect: 'sqlite', dialect: 'sqlite',
logging: false, logging: false,
host: DB_HOST,
}); });
const RoleEmojiPair = defineRoleEmojiPair(sequelize); const RoleEmojiPair = defineRoleEmojiPair(sequelize);
const VoiceChannel = defineVoiceChannel(sequelize); const VoiceChannel = defineVoiceChannel(sequelize);