Skip to content

Commit

Permalink
refactor: unify file names
Browse files Browse the repository at this point in the history
  • Loading branch information
yuimarudev committed Feb 19, 2024
1 parent 5f27fd5 commit e9672c1
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/commands/dict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
APIInteractionGuildMember,
RESTPostAPIChatInputApplicationCommandsJSONBody,
} from "@discordjs/core";
import { transmute } from "../common/functions.js";
import { NonNullableByKey } from "../common/types.js";
import { transmute } from "../commons/functions.js";
import { NonNullableByKey } from "../commons/types.js";
import { prisma } from "../index.js";
import { ICommand } from "./index.js";

Expand Down
4 changes: 2 additions & 2 deletions src/commands/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
MessageFlags,
RESTPostAPIChatInputApplicationCommandsJSONBody,
} from "@discordjs/core";
import { transmute } from "../common/functions.js";
import { NonNullableByKey } from "../common/types.js";
import { transmute } from "../commons/functions.js";
import { NonNullableByKey } from "../commons/types.js";
import { type ICommand, commands } from "./index.js";

export default class Help implements ICommand {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
APIInteractionGuildMember,
InteractionType,
} from "@discordjs/core";
import { NonNullableByKey } from "../common/types.js";
import { NonNullableByKey } from "../commons/types.js";

export function validate(
i: APIInteraction,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {
APIInteractionGuildMember,
RESTPostAPIChatInputApplicationCommandsJSONBody,
} from "@discordjs/core";
import { NonNullableByKey } from "../common/types.js";
import { NonNullableByKey } from "../commons/types.js";
import Dict from "./dict.js";
import Join from "./join.js";
import Leave from "./leave.js";
import Ping from "./ping.js";
import { UserSettings } from "./userSetting.js";
import UserSettings from "./userSettings.js";

export const commands: ICommand[] = [
new Ping(),
Expand Down
4 changes: 2 additions & 2 deletions src/commands/join.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
MessageFlags,
RESTPostAPIChatInputApplicationCommandsJSONBody,
} from "@discordjs/core";
import { voiceStates } from "../common/cache.js";
import { NonNullableByKey } from "../common/types.js";
import { voiceStates } from "../commons/cache.js";
import { NonNullableByKey } from "../commons/types.js";
import { gateway } from "../index.js";
import Room, { roomManager } from "../voice/room.js";
import { type ICommand } from "./index.js";
Expand Down
4 changes: 2 additions & 2 deletions src/commands/leave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
MessageFlags,
RESTPostAPIChatInputApplicationCommandsJSONBody,
} from "@discordjs/core";
import { voiceStates } from "../common/cache.js";
import { NonNullableByKey } from "../common/types.js";
import { voiceStates } from "../commons/cache.js";
import { NonNullableByKey } from "../commons/types.js";
import { roomManager } from "../voice/room.js";
import { type ICommand } from "./index.js";

Expand Down
2 changes: 1 addition & 1 deletion src/commands/ping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
MessageFlags,
RESTPostAPIChatInputApplicationCommandsJSONBody,
} from "@discordjs/core";
import { NonNullableByKey } from "../common/types.js";
import { NonNullableByKey } from "../commons/types.js";
import { type ICommand } from "./index.js";

export default class Ping implements ICommand {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/userSetting.ts → src/commands/userSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import {
APIInteractionGuildMember,
RESTPostAPIChatInputApplicationCommandsJSONBody,
} from "@discordjs/core";
import { transmute } from "../common/functions.js";
import { NonNullableByKey } from "../common/types.js";
import { transmute } from "../commons/functions.js";
import { NonNullableByKey } from "../commons/types.js";
import { prisma } from "../index.js";
import { voices } from "../synthesizer/index.js";
import { ICommand } from "./index.js";

export class UserSettings implements ICommand {
export default class UserSettings implements ICommand {
defition(): RESTPostAPIChatInputApplicationCommandsJSONBody {
return new SlashCommandBuilder()
.setName("user-settings")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/handlers/guildCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
members,
users,
voiceStates,
} from "../common/cache.js";
import { NonNullableByKey } from "../common/types.js";
} from "../commons/cache.js";
import { NonNullableByKey } from "../commons/types.js";
import { gateway } from "../index.js";

export default async ({
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/guildMemberUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
GatewayGuildMemberUpdateDispatchData,
WithIntrinsicProps,
} from "@discordjs/core";
import { members } from "../common/cache.js";
import { members } from "../commons/cache.js";

export default async ({
data,
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/guildMembersChunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
GatewayGuildMembersChunkDispatchData,
WithIntrinsicProps,
} from "@discordjs/core";
import { members, users } from "../common/cache.js";
import { NonNullableByKey } from "../common/types.js";
import { members, users } from "../commons/cache.js";
import { NonNullableByKey } from "../commons/types.js";

export default async ({
data,
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/messageCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
GatewayMessageCreateDispatchData,
WithIntrinsicProps,
} from "@discordjs/core";
import { transmute } from "../common/functions.js";
import { transmute } from "../commons/functions.js";
import { roomManager } from "../voice/room.js";

export default async ({
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/userUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
GatewayUserUpdateDispatchData,
WithIntrinsicProps,
} from "@discordjs/core";
import { users } from "../common/cache.js";
import { users } from "../commons/cache.js";

export default async ({
data,
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/voiceStateUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
WithIntrinsicProps,
} from "@discordjs/core";
import { Mutex } from "async-mutex";
import { voiceStates } from "../common/cache.js";
import { __catch, except } from "../common/functions.js";
import { voiceStates } from "../commons/cache.js";
import { __catch, except } from "../commons/functions.js";
import { roomManager } from "../voice/room.js";
import { adapters } from "../voice/voiceAdapterCreator.js";

Expand Down
4 changes: 2 additions & 2 deletions src/voice/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
} from "@discordjs/voice";
import { WebSocketManager } from "@discordjs/ws";
import { Mutex } from "async-mutex";
import cleanContent from "../common/cleanContent.js";
import { __catch, except } from "../common/functions.js";
import cleanContent from "../commons/cleanContent.js";
import { __catch, except } from "../commons/functions.js";
import { prisma } from "../index.js";
import Synthesizer from "../synthesizer/index.js";
import voiceAdapterCreator from "./voiceAdapterCreator.js";
Expand Down

0 comments on commit e9672c1

Please sign in to comment.