Skip to content

Commit 8f6ddba

Browse files
committed
refactor: adjust events import paths
1 parent 18d612e commit 8f6ddba

5 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/events/has-var.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Events } from 'discord.js';
22
import ts from 'typescript';
33
import { MINUTE } from '../constants/time.js';
4+
import { createEvent } from '../util/events.js';
45
import { codeBlockRegex } from '../util/message.js';
56
import { rateLimit } from '../util/rate-limit.js';
6-
import { createEvent } from './index.js';
77

88
const { canRun, reset } = rateLimit(5 * MINUTE);
99

@@ -64,7 +64,6 @@ export const hasVarEvent = createEvent(
6464
}
6565
}
6666
}
67-
6867
return;
6968
}
7069
);

src/events/interaction-create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Events } from 'discord.js';
2-
import { commands } from '../util/loaders.js';
3-
import { createEvent } from './index.js';
2+
import { commands } from '../commands/index.js';
3+
import { createEvent } from '../util/events.js';
44

55
export const interactionCreateEvent = createEvent(
66
{

src/events/just-ask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Events } from 'discord.js';
22
import { MINUTE } from '../constants/time.js';
3+
import { createEvent } from '../util/events.js';
34
import { loadMarkdownOptions } from '../util/markdown.js';
45
import { rateLimit } from '../util/rate-limit.js';
5-
import { createEvent } from './index.js';
66

77
// Subject patterns (who)
88
const reSubject = `(?:(?:any|some|no|every)(?:one|body)|people|folks|peeps|who)`;

src/events/ready.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Events } from 'discord.js';
2-
import { createEvent } from './index.js';
2+
import { createEvent } from '../util/events.js';
33

44
export const readyEvent = createEvent(
55
{

src/util/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { API } from '@discordjs/core/http-only';
22
import { REST, type RESTPutAPIApplicationCommandsResult } from 'discord.js';
3+
import { commands } from '../commands/index.js';
34
import { config } from '../env.js';
4-
import { commands } from './loaders.js';
55

66
export async function deployCommands(): Promise<RESTPutAPIApplicationCommandsResult> {
77
const commandData = [...commands.values()].map((command) => command.data);

0 commit comments

Comments
 (0)