Skip to content

Commit

Permalink
Refactor file paths to use proper casing
Browse files Browse the repository at this point in the history
  • Loading branch information
EvarinDev committed Sep 7, 2024
1 parent 5680124 commit e15078d
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/structures/Filters.ts → src/Structures/Filters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Band, bassBoostEqualizer, softEqualizer, trebleBassEqualizer, tvEqualizer, vaporwaveEqualizer } from "../utils/FiltersEqualizers";
import { Band, bassBoostEqualizer, softEqualizer, trebleBassEqualizer, tvEqualizer, vaporwaveEqualizer } from "../Utils/FiltersEqualizers";
import { Player } from "./Player";

export class Filters {
Expand Down
4 changes: 2 additions & 2 deletions src/structures/Manager.ts → src/Structures/Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Collection } from "@discordjs/collection";
import { Node, NodeOptions } from "./Node";
import { Player, PlayerOptions, Track, UnresolvedTrack } from "./Player";
import { VoiceState } from "..";
import managerCheck from "../utils/ManagerCheck";
import managerCheck from "../Utils/ManagerCheck";
import { ClientUser, User } from "discord.js";
import { TypedEmitter } from "tiny-typed-emitter";

Expand Down Expand Up @@ -420,7 +420,7 @@ export interface ManagerOptions {
defaultSearchPlatform?: SearchPlatform;
/** Whether the YouTube video titles should be replaced if the Author does not exactly match. */
replaceYouTubeCredentials?: boolean;
caches?: {
caches: {
/** Whether to cache the search results. */
enabled: boolean;
/** The time to cache the search results. */
Expand Down
2 changes: 1 addition & 1 deletion src/structures/Node.ts → src/Structures/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import { LavalinkResponse, Manager, PlaylistRawData } from "./Manager";
import { Player, Track, UnresolvedTrack } from "./Player";
import { Rest } from "./Rest";
import nodeCheck from "../utils/NodeCheck";
import nodeCheck from "../Utils/NodeCheck";
import WebSocket from "ws";

export class Node {
Expand Down
6 changes: 2 additions & 4 deletions src/structures/Player.ts → src/Structures/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LavalinkInfo, Node } from "./Node";
import { Queue } from "./Queue";
import { Sizes, State, Structure, TrackSourceName, TrackUtils, VoiceState } from "./Utils";
import * as _ from "lodash";
import playerCheck from "../utils/PlayerCheck";
import playerCheck from "../Utils/PlayerCheck";
import { ClientUser, Message, User } from "discord.js";

export class Player {
Expand Down Expand Up @@ -545,9 +545,7 @@ export class Player {
if (!this.queue.current) return undefined;
position = Number(position);

if (isNaN(position)) {
throw new RangeError("Position must be a number.");
}
if (isNaN(position)) throw new RangeError("Position must be a number.");
if (position < 0 || position > this.queue.current.duration) position = Math.max(Math.min(position, this.queue.current.duration), 0);

this.position = position;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions src/utils/ManagerCheck.ts → src/Utils/ManagerCheck.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ManagerOptions } from "../structures/Manager";
import { ManagerOptions } from "../Structures/Manager";

export default function ManagerCheck(options: ManagerOptions) {
if (!options) throw new TypeError("ManagerOptions must not be empty.");

const { autoPlay, clientId, clientName, defaultSearchPlatform, nodes, plugins, send, shards, trackPartial, usePriority, useNode, replaceYouTubeCredentials } =
const { autoPlay, clientId, clientName, defaultSearchPlatform, nodes, plugins, send, shards, trackPartial, usePriority, useNode, replaceYouTubeCredentials, caches } =
options;

if (typeof autoPlay !== "undefined" && typeof autoPlay !== "boolean") {
Expand All @@ -17,7 +17,9 @@ export default function ManagerCheck(options: ManagerOptions) {
if (typeof clientName !== "undefined" && typeof clientName !== "string") {
throw new TypeError('Manager option "clientName" must be a string.');
}

if (typeof caches !== "undefined" && typeof caches !== "object") {
throw new TypeError('Manager option "caches" must be a object.');
}
if (typeof defaultSearchPlatform !== "undefined" && typeof defaultSearchPlatform !== "string") {
throw new TypeError('Manager option "defaultSearchPlatform" must be a string.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/NodeCheck.ts → src/Utils/NodeCheck.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NodeOptions } from "../structures/Node";
import { NodeOptions } from "../Structures/Node";

export default function NodeCheck(options: NodeOptions) {
if (!options) throw new TypeError("NodeOptions must not be empty.");
Expand Down
2 changes: 1 addition & 1 deletion src/utils/PlayerCheck.ts → src/Utils/PlayerCheck.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PlayerOptions } from "../structures/Player";
import { PlayerOptions } from "../Structures/Player";

export default function PlayerCheck(options: PlayerOptions) {
if (!options) throw new TypeError("PlayerOptions must not be empty.");
Expand Down
22 changes: 11 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export * from "./structures/Manager";
export * from "./structures/Node";
export * from "./structures/Player";
export * from "./structures/Queue";
export * from "./structures/Utils";
export * from "./structures/Filters";
export * from "./structures/Rest";
export * from "./utils/FiltersEqualizers";
export * from "./utils/ManagerCheck";
export * from "./utils/NodeCheck";
export * from "./utils/PlayerCheck";
export * from "./Structures/Manager";
export * from "./Structures/Node";
export * from "./Structures/Player";
export * from "./Structures/Queue";
export * from "./Structures/Utils";
export * from "./Structures/Filters";
export * from "./Structures/Rest";
export * from "./Utils/FiltersEqualizers";
export * from "./Utils/ManagerCheck";
export * from "./Utils/NodeCheck";
export * from "./Utils/PlayerCheck";

0 comments on commit e15078d

Please sign in to comment.