Skip to content

Commit

Permalink
fix: dont import InteractionType as type
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Aug 5, 2022
1 parent ad7beb8 commit 716cabd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/listeners/AutocompleteHandler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Interaction, InteractionType } from 'discord.js';
import { type Interaction, InteractionType } from 'discord.js';
import { Handlers } from '../lib/managers/HandlerManager';
import { Listener } from '../lib/structures/Listener';
import { Logger } from '../lib/util/logger/Logger';
Expand Down
7 changes: 5 additions & 2 deletions src/listeners/ComponentHandler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Interaction, InteractionType } from 'discord.js';
import { type Interaction, InteractionType } from 'discord.js';
import { Handlers } from '../lib/managers/HandlerManager';
import { Listener } from '../lib/structures/Listener';
import { Logger } from '../lib/util/logger/Logger';
Expand All @@ -7,7 +7,10 @@ new Listener({
event: 'interactionCreate',
name: 'gcommands-componentHandler',
run: async (interaction: Interaction): Promise<void> => {
if (interaction.type === InteractionType.MessageComponent || interaction.type === InteractionType.ModalSubmit) {
if (
interaction.type === InteractionType.MessageComponent ||
interaction.type === InteractionType.ModalSubmit
) {
await Handlers.componentHandler(interaction).catch(error => {
Logger.error(
typeof error.code !== 'undefined' ? error.code : '',
Expand Down
2 changes: 1 addition & 1 deletion src/listeners/InteractionCommandHandler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Interaction, InteractionType } from 'discord.js';
import { type Interaction, InteractionType } from 'discord.js';
import { Handlers } from '../lib/managers/HandlerManager';
import { Listener } from '../lib/structures/Listener';
import { Logger } from '../lib/util/logger/Logger';
Expand Down

0 comments on commit 716cabd

Please sign in to comment.