1
1
mirror of https://github.com/Burn-E99/GroupUp.git synced 2026-06-04 08:53:49 -04:00

restructure DB files to make initialization easier

This commit is contained in:
Ean Milligan
2024-05-18 18:05:40 -04:00
parent 7f7f7e2445
commit 5a8cd8e8bb
36 changed files with 93 additions and 60 deletions

View File

@@ -1,7 +1,8 @@
import config from '../../config.ts';
import { Bot, log, LT } from '../../deps.ts';
import { warnColor } from '../commandUtils.ts';
import { dbClient, lfgChannelSettings } from '../db.ts';
import { dbClient } from '../db/client.ts';
import { lfgChannelSettings } from '../db/common.ts';
import utils from '../utils.ts';
export const guildDelete = async (bot: Bot, guildId: bigint) => {

View File

@@ -2,9 +2,10 @@ import config from '../../config.ts';
import utils from '../utils.ts';
import { Bot, botId, Message } from '../../deps.ts';
import { infoEmbed } from '../commandUtils.ts';
import { dbClient, generateGuildSettingKey, lfgChannelSettings, queries } from '../db.ts';
import { dbClient } from '../db/client.ts';
import { generateGuildSettingKey, lfgChannelSettings, queries } from '../db/common.ts';
export const messageCreate = async (bot: Bot, message: Message) => {
export const messageCreate = (bot: Bot, message: Message) => {
// Ignore self
if (botId === message.authorId) return;

View File

@@ -4,7 +4,8 @@ import { LOCALMODE } from '../../flags.ts';
import { getRandomStatus, successColor } from '../commandUtils.ts';
import { ActiveEvent } from '../types/commandTypes.ts';
import utils from '../utils.ts';
import { dbClient, queries } from '../db.ts';
import { dbClient } from '../db/client.ts';
import { queries } from '../db/common.ts';
import { deleteEvent, handleFailures, lockEvent, notifyEventMembers, tenMinutes } from '../notificationSystem.ts';
import { updateBotListStatistics } from '../botListPoster.ts';
@@ -27,7 +28,7 @@ export const ready = (rawBot: Bot) => {
// Interval to rotate the status text every 30 seconds to show off more commands
if (botStatusIntervalId) clearInterval(botStatusIntervalId);
botStatusIntervalId = setInterval(async () => {
botStatusIntervalId = setInterval(() => {
log(LT.LOG, 'Changing bot status');
bot.helpers.editBotStatus({
activities: [{