Skip to content

Commit

Permalink
fix: change path to util/logger
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Feb 1, 2022
1 parent 5131275 commit 555d054
Show file tree
Hide file tree
Showing 27 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/handlers/AutocompleteHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { AutocompleteInteraction } from 'discord.js';
import { AutocompleteContext } from '../lib/structures/contexts/AutocompleteContext';
import type { Argument } from '../lib/structures/Argument';
import { Commands } from '../lib/managers/CommandManager';
import { Logger, LoggerEvents } from '../lib/structures/Logger';
import { Logger, LoggerEvents } from '../lib/util/logger/Logger';
import type { GClient } from '../lib/GClient';

export async function AutocompleteHandler(interaction: AutocompleteInteraction) {
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/ComponentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ComponentContext } from '../lib/structures/contexts/ComponentContext';
import { Components } from '../lib/managers/ComponentManager';
import { Handlers } from '../lib/managers/HandlerManager';
import { setTimeout } from 'node:timers';
import { Logger, LoggerEvents } from '../lib/structures/Logger';
import { Logger, LoggerEvents } from '../lib/util/logger/Logger';

const cooldowns = new Collection<string, Collection<string, number>>();

Expand Down
2 changes: 1 addition & 1 deletion src/handlers/InteractionCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CommandContext } from '../lib/structures/contexts/CommandContext';
import { Handlers } from '../lib/managers/HandlerManager';
import { Commands } from '../lib/managers/CommandManager';
import { setTimeout } from 'node:timers';
import { Logger, LoggerEvents } from '../lib/structures/Logger';
import { Logger, LoggerEvents } from '../lib/util/logger/Logger';

const cooldowns = new Collection<string, Collection<string, number>>();

Expand Down
2 changes: 1 addition & 1 deletion src/handlers/MessageCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CommandType } from '../lib/structures/Command';
import { ArgumentType } from '../lib/structures/Argument';
import { Commands } from '../lib/managers/CommandManager';
import { Handlers } from '../lib/managers/HandlerManager';
import { Logger, LoggerEvents } from '../lib/structures/Logger';
import { Logger, LoggerEvents } from '../lib/util/logger/Logger';

const cooldowns = new Collection<string, Collection<string, number>>();

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export { Listeners, ListenerManager } from './lib/managers/ListenerManager';
export { Handlers, HandlerManager } from './lib/managers/HandlerManager';

// Logger
export { Logger, ILogger, LoggerEvents } from './lib/structures/Logger';
export { Logger, ILogger, LoggerEvents } from './lib/util/logger/Logger';

// Inhibitors
export * as Inhibitor from './inhibitors';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/managers/CommandManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Collection } from 'discord.js';
import { Command } from '../structures/Command';
import type { GClient } from '../GClient';
import { Logger, LoggerEvents } from '../structures/Logger';
import { Logger, LoggerEvents } from '../util/logger/Logger';
import { Plugins } from './PluginManager';

export class CommandManager extends Collection<string, Command> {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/managers/ComponentManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Collection } from 'discord.js';
import { Component } from '../structures/Component';
import type { GClient } from '../GClient';
import { Logger, LoggerEvents } from '../structures/Logger';
import { Logger, LoggerEvents } from '../util/logger/Logger';
import { Plugins } from './PluginManager';

export class ComponentManager extends Collection<string, Component> {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/managers/ListenerManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { GClient } from '../GClient';
import { Listener } from '../structures/Listener';
import { ClientEvents, Collection, WSEventType } from 'discord.js';
import { Logger, LoggerEvents } from '../structures/Logger';
import { Logger, LoggerEvents } from '../util/logger/Logger';
import { Plugins } from './PluginManager';

export class ListenerManager extends Collection<string, Listener> {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/managers/PluginManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Collection } from 'discord.js';
import { Plugin } from '../structures/Plugin';
import type { GClient } from '../GClient';
import { pluginFinder } from '../loaders/pluginFinder';
import { Logger, LoggerEvents } from '../structures/Logger';
import { Logger, LoggerEvents } from '../util/logger/Logger';

export class PluginManager extends Collection<string, Plugin> {
private client: GClient;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/structures/Argument.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Command } from './Command';
import type { AutocompleteContext } from './contexts/AutocompleteContext';
import { Logger } from './Logger';
import { Logger } from '../util/logger/Logger';
import { Util } from '../util/Util';
import type { ApplicationCommandOptionType } from 'discord-api-types';

Expand Down
2 changes: 1 addition & 1 deletion src/lib/structures/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AutoDeferType, GClient } from '../GClient';
import { Argument } from './Argument';
import type { CommandContext } from './contexts/CommandContext';
import { Commands } from '../managers/CommandManager';
import { Logger } from './Logger';
import { Logger } from '../util/logger/Logger';
import { Util } from '../util/Util';

export enum CommandType {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/structures/Component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AutoDeferType, GClient } from '../GClient';
import type { ComponentContext } from './contexts/ComponentContext';
import { Components } from '../managers/ComponentManager';
import { Logger } from './Logger';
import { Logger } from '../util/logger/Logger';
import { Util } from '../util/Util';

export enum ComponentType {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/structures/Listener.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { GClient } from '../GClient';
import type { ClientEvents, WSEventType } from 'discord.js';
import { Listeners } from '../managers/ListenerManager';
import { Logger } from './Logger';
import { Logger } from '../util/logger/Logger';
import { Util } from '../util/Util';

export interface ListenerOptions<
Expand Down
2 changes: 1 addition & 1 deletion src/lib/structures/Plugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { GClient } from '../GClient';
import { Plugins } from '../managers/PluginManager';
import { Logger } from './Logger';
import { Logger } from '../util/logger/Logger';
import { Util } from '../util/Util';

export class Plugin {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/structures/Provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Logger } from './Logger';
import { Logger } from '../util/logger/Logger';
import { EventEmitter } from 'events';
import { Util } from '../util/Util';

Expand Down
16 changes: 8 additions & 8 deletions src/lib/structures/Logger.ts → src/lib/util/logger/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import EventEmitter from 'events';
import JSLogger, { ILogger as JSILogger, ILoggerOpts, ILogHandler, ILogLevel } from 'js-logger';
import { Util } from '../util/Util';
import { Util } from '../Util';
import type { GlobalLogger } from 'js-logger';
import type { AutocompleteContext } from './contexts/AutocompleteContext';
import type { CommandContext } from './contexts/CommandContext';
import type { ComponentContext } from './contexts/ComponentContext';
import type { Command } from './Command';
import type { Component } from './Component';
import type { Listener } from './Listener';
import type { Plugin } from './Plugin';
import type { AutocompleteContext } from '../../structures/contexts/AutocompleteContext';
import type { CommandContext } from '../../structures/contexts/CommandContext';
import type { ComponentContext } from '../../structures/contexts/ComponentContext';
import type { Command } from '../../structures/Command';
import type { Component } from '../../structures/Component';
import type { Listener } from '../../structures/Listener';
import type { Plugin } from '../../structures/Plugin';

export enum LoggerEvents {
'HANDLER_RUN' = 'handlerRun',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/util/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { GClient } from '../GClient';
import type { Command } from '../structures/Command';
import { REST } from '@discordjs/rest';
import { Routes } from 'discord-api-types/v9';
import { Logger } from '../structures/Logger';
import { Logger } from './logger/Logger';
import { setTimeout } from 'node:timers';
import { Commands } from '../managers/CommandManager';

Expand Down
2 changes: 1 addition & 1 deletion src/listeners/AutocompleteHandler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Listener } from '../lib/structures/Listener';
import type { Interaction } from 'discord.js';
import { Handlers } from '../lib/managers/HandlerManager';
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';

new Listener({
event: 'interactionCreate',
Expand Down
2 changes: 1 addition & 1 deletion src/listeners/ComponentHandler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Listener } from '../lib/structures/Listener';
import type { Interaction } from 'discord.js';
import { Handlers } from '../lib/managers/HandlerManager';
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';

new Listener({
event: 'interactionCreate',
Expand Down
2 changes: 1 addition & 1 deletion src/listeners/InteractionCommandHandler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Listener } from '../lib/structures/Listener';
import type { Interaction } from 'discord.js';
import { Handlers } from '../lib/managers/HandlerManager';
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';

new Listener({
event: 'interactionCreate',
Expand Down
2 changes: 1 addition & 1 deletion src/listeners/MessageCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Listener } from '../lib/structures/Listener';
import type { GClient } from '../lib/GClient';
import type { Message } from 'discord.js';
import { Handlers } from '../lib/managers/HandlerManager';
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';

new Listener({
event: 'messageCreate',
Expand Down
2 changes: 1 addition & 1 deletion src/listeners/Ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Listener } from '../lib/structures/Listener';
import type { GClient } from '../lib/GClient';
import type { Client } from 'discord.js';
import { sync } from '../lib/util/sync';
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';

new Listener({
event: 'ready',
Expand Down
2 changes: 1 addition & 1 deletion src/providers/FirestoreProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Firestore } from '@google-cloud/firestore';
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';
import { Provider, ProviderTypes } from '../lib/structures/Provider';

export class FirestoreProvider extends Provider {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/KeyvProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';
import Keyv from 'keyv';
import { Provider, ProviderTypes } from '../lib/structures/Provider';

Expand Down
2 changes: 1 addition & 1 deletion src/providers/LruCacheProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';
import LruCache from 'lru-cache';
import { Provider, ProviderTypes } from '../lib/structures/Provider';

Expand Down
2 changes: 1 addition & 1 deletion src/providers/MongoDBProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';
import { Db, Document, Filter, FindOptions, MongoClient, UpdateFilter, UpdateOptions } from 'mongodb';
import { Provider, ProviderTypes } from '../lib/structures/Provider';

Expand Down
2 changes: 1 addition & 1 deletion src/providers/PrismaIOProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PrismaClient } from '@prisma/client';
import { Logger } from '../lib/structures/Logger';
import { Logger } from '../lib/util/logger/Logger';
import { Provider, ProviderTypes } from '../lib/structures/Provider';

export class PrismaIOProvider extends Provider {
Expand Down

0 comments on commit 555d054

Please sign in to comment.