mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-05-10 10:43:06 +00:00
chore: update and clean up imports
This commit is contained in:
parent
d9d5f087e7
commit
9aabe2885b
30 changed files with 78 additions and 84 deletions
|
@ -9,8 +9,8 @@ import {
|
|||
JSONEncodable,
|
||||
} from 'discord.js';
|
||||
|
||||
import { getAllMembers } from '../../db/db.js';
|
||||
import { Command } from '../../types/CommandTypes.js';
|
||||
import { getAllMembers } from '@/db/db.js';
|
||||
import { Command } from '@/types/CommandTypes.js';
|
||||
|
||||
const command: Command = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
import { Command } from '../../types/CommandTypes.js';
|
||||
import { Command } from '@/types/CommandTypes.js';
|
||||
|
||||
const command: Command = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { PermissionsBitField, SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
import { Command } from '../../types/CommandTypes.js';
|
||||
import { recalculateUserLevels } from '../../util/levelingSystem.js';
|
||||
import { Command } from '@/types/CommandTypes.js';
|
||||
import { recalculateUserLevels } from '@/util/levelingSystem.js';
|
||||
|
||||
const command: Command = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -4,17 +4,14 @@ import {
|
|||
SlashCommandBuilder,
|
||||
} from 'discord.js';
|
||||
|
||||
import { SubcommandCommand } from '../../types/CommandTypes.js';
|
||||
import { loadConfig } from '../../util/configLoader.js';
|
||||
import {
|
||||
initializeDatabaseConnection,
|
||||
ensureDbInitialized,
|
||||
} from '../../db/db.js';
|
||||
import { isRedisConnected } from '../../db/redis.js';
|
||||
import { SubcommandCommand } from '@/types/CommandTypes.js';
|
||||
import { loadConfig } from '@/util/configLoader.js';
|
||||
import { initializeDatabaseConnection, ensureDbInitialized } from '@/db/db.js';
|
||||
import { isRedisConnected } from '@/db/redis.js';
|
||||
import {
|
||||
NotificationType,
|
||||
notifyManagers,
|
||||
} from '../../util/notificationHandler.js';
|
||||
} from '@/util/notificationHandler.js';
|
||||
|
||||
const command: SubcommandCommand = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
@ -123,7 +120,7 @@ async function handleRedisReconnect(interaction: CommandInteraction) {
|
|||
await interaction.editReply('Attempting to reconnect to Redis...');
|
||||
|
||||
try {
|
||||
const redisModule = await import('../../db/redis.js');
|
||||
const redisModule = await import('@/db/redis.js');
|
||||
|
||||
await redisModule.ensureRedisConnection();
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@ import { PermissionsBitField, SlashCommandBuilder } from 'discord.js';
|
|||
import { exec } from 'child_process';
|
||||
import { promisify } from 'util';
|
||||
|
||||
import { Command } from '../../types/CommandTypes.js';
|
||||
import { loadConfig } from '../../util/configLoader.js';
|
||||
import { Command } from '@/types/CommandTypes.js';
|
||||
import { loadConfig } from '@/util/configLoader.js';
|
||||
import {
|
||||
NotificationType,
|
||||
notifyManagers,
|
||||
} from '../../util/notificationHandler.js';
|
||||
import { isRedisConnected } from '../../db/redis.js';
|
||||
import { ensureDatabaseConnection } from '../../db/db.js';
|
||||
} from '@/util/notificationHandler.js';
|
||||
import { isRedisConnected } from '@/db/redis.js';
|
||||
import { ensureDatabaseConnection } from '@/db/db.js';
|
||||
|
||||
const execAsync = promisify(exec);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
||||
|
||||
import { Command } from '../../types/CommandTypes.js';
|
||||
import { Command } from '@/types/CommandTypes.js';
|
||||
|
||||
const rulesEmbed = new EmbedBuilder()
|
||||
.setColor(0x0099ff)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
import { Command } from '../../types/CommandTypes.js';
|
||||
import { Command } from '@/types/CommandTypes.js';
|
||||
|
||||
const command: Command = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -5,8 +5,8 @@ import {
|
|||
PermissionsBitField,
|
||||
} from 'discord.js';
|
||||
|
||||
import { getMember } from '../../db/db.js';
|
||||
import { OptionsCommand } from '../../types/CommandTypes.js';
|
||||
import { getMember } from '@/db/db.js';
|
||||
import { OptionsCommand } from '@/types/CommandTypes.js';
|
||||
|
||||
const command: OptionsCommand = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
import { SubcommandCommand } from '../../types/CommandTypes.js';
|
||||
import { addXpToUser, getUserLevel } from '../../db/db.js';
|
||||
import { loadConfig } from '../../util/configLoader.js';
|
||||
import { SubcommandCommand } from '@/types/CommandTypes.js';
|
||||
import { addXpToUser, getUserLevel } from '@/db/db.js';
|
||||
import { loadConfig } from '@/util/configLoader.js';
|
||||
|
||||
const command: SubcommandCommand = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue