Skip to content

Commit

Permalink
Remove @alice- prefixes in module aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Rian8337 committed Oct 27, 2024
1 parent 065ecc9 commit f44ef8d
Show file tree
Hide file tree
Showing 1,174 changed files with 5,065 additions and 5,033 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@
"zlib-sync": "^0.1.7"
},
"_moduleAliases": {
"@alice-core": "dist/core",
"@alice-database": "dist/database",
"@alice-enums": "dist/enums",
"@alice-events": "dist/events",
"@alice-interactions": "dist/interactions",
"@alice-localization": "dist/localization",
"@alice-structures": "dist/structures",
"@alice-utils": "dist/utils"
"@core": "dist/core",
"@database": "dist/database",
"@enums": "dist/enums",
"@events": "dist/events",
"@interactions": "dist/interactions",
"@localization": "dist/localization",
"@structures": "dist/structures",
"@utils": "dist/utils"
},
"eslintConfig": {
"env": {
Expand Down
28 changes: 14 additions & 14 deletions src/core/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ import {
import { consola } from "consola";
import { SlashCommand } from "structures/core/SlashCommand";
import { Event } from "structures/core/Event";
import { TimeoutManager } from "@alice-utils/managers/TimeoutManager";
import { LoungeLockManager } from "@alice-utils/managers/LoungeLockManager";
import { ProfileManager } from "@alice-utils/managers/ProfileManager";
import { WhitelistManager } from "@alice-utils/managers/WhitelistManager";
import { DatabaseManager } from "@alice-database/DatabaseManager";
import { CommandUtilManager } from "@alice-utils/managers/CommandUtilManager";
import { TimeoutManager } from "@utils/managers/TimeoutManager";
import { LoungeLockManager } from "@utils/managers/LoungeLockManager";
import { ProfileManager } from "@utils/managers/ProfileManager";
import { WhitelistManager } from "@utils/managers/WhitelistManager";
import { DatabaseManager } from "@database/DatabaseManager";
import { CommandUtilManager } from "@utils/managers/CommandUtilManager";
import { EventUtil } from "structures/core/EventUtil";
import { StringHelper } from "@alice-utils/helpers/StringHelper";
import { Manager } from "@alice-utils/base/Manager";
import { StringHelper } from "@utils/helpers/StringHelper";
import { Manager } from "@utils/base/Manager";
import { SlashSubcommand } from "structures/core/SlashSubcommand";
import { WarningManager } from "@alice-utils/managers/WarningManager";
import { WarningManager } from "@utils/managers/WarningManager";
import { ModalCommand } from "structures/core/ModalCommand";
import { BotInteractions } from "structures/core/BotInteractions";
import { ContextMenuCommand } from "structures/core/ContextMenuCommand";
import { Config } from "./Config";
import { AutocompleteHandler } from "@alice-structures/core/AutocompleteHandler";
import { AutocompleteSubhandler } from "@alice-structures/core/AutocompleteSubhandler";
import { ButtonCommand } from "@alice-structures/core/ButtonCommand";
import { LocaleHelper } from "@alice-utils/helpers/LocaleHelper";
import { AnniversaryTriviaManager } from "@alice-utils/managers/AnniversaryTriviaManager";
import { AutocompleteHandler } from "@structures/core/AutocompleteHandler";
import { AutocompleteSubhandler } from "@structures/core/AutocompleteSubhandler";
import { ButtonCommand } from "@structures/core/ButtonCommand";
import { LocaleHelper } from "@utils/helpers/LocaleHelper";
import { AnniversaryTriviaManager } from "@utils/managers/AnniversaryTriviaManager";

/**
* The starting point of the bot.
Expand Down
2 changes: 1 addition & 1 deletion src/core/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConstantsStrings } from "@alice-localization/core/constants/ConstantsLocalization";
import { ConstantsStrings } from "@localization/core/constants/ConstantsLocalization";
import { Snowflake } from "discord.js";
import { join } from "path";

Expand Down
2 changes: 1 addition & 1 deletion src/database/managers/DatabaseCollectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseDocument } from "structures/database/BaseDocument";
import { OperationResult } from "structures/core/OperationResult";
import { Manager } from "@alice-utils/base/Manager";
import { Manager } from "@utils/base/Manager";
import { Collection as DiscordCollection } from "discord.js";
import {
Collection as MongoDBCollection,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DatabaseAccountTransfer } from "@alice-structures/database/aliceDb/DatabaseAccountTransfer";
import { DatabaseAccountTransfer } from "@structures/database/aliceDb/DatabaseAccountTransfer";
import { DatabaseCollectionManager } from "../DatabaseCollectionManager";
import { AccountTransfer } from "@alice-database/utils/aliceDb/AccountTransfer";
import { AccountTransfer } from "@database/utils/aliceDb/AccountTransfer";
import { FindOptions } from "mongodb";
import { Snowflake } from "discord.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AnniversaryTriviaPlayer } from "@alice-database/utils/aliceDb/AnniversaryTriviaPlayer";
import { DatabaseAnniversaryTriviaPlayer } from "@alice-structures/database/aliceDb/DatabaseAnniversaryTriviaPlayer";
import { AnniversaryTriviaPlayer } from "@database/utils/aliceDb/AnniversaryTriviaPlayer";
import { DatabaseAnniversaryTriviaPlayer } from "@structures/database/aliceDb/DatabaseAnniversaryTriviaPlayer";
import { DatabaseCollectionManager } from "../DatabaseCollectionManager";
import { Snowflake } from "discord.js";
import { FindOptions } from "mongodb";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DatabaseAnniversaryTriviaQuestion } from "@alice-structures/database/aliceDb/DatabaseAnniversaryTriviaQuestion";
import { DatabaseAnniversaryTriviaQuestion } from "@structures/database/aliceDb/DatabaseAnniversaryTriviaQuestion";
import { DatabaseCollectionManager } from "../DatabaseCollectionManager";
import { AnniversaryTriviaQuestion } from "@alice-database/utils/aliceDb/AnniversaryTriviaQuestion";
import { AnniversaryTriviaQuestion } from "@database/utils/aliceDb/AnniversaryTriviaQuestion";
import { FindOptions } from "mongodb";

/**
Expand Down
6 changes: 3 additions & 3 deletions src/database/managers/aliceDb/AskCountCollectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DatabaseCollectionManager } from "@alice-database/managers/DatabaseCollectionManager";
import { AskCount } from "@alice-database/utils/aliceDb/AskCount";
import { DatabaseCollectionManager } from "@database/managers/DatabaseCollectionManager";
import { AskCount } from "@database/utils/aliceDb/AskCount";
import { DatabaseAskCount } from "structures/database/aliceDb/DatabaseAskCount";
import { Snowflake } from "discord.js";

Expand All @@ -11,7 +11,7 @@ export class AskCountCollectionManager extends DatabaseCollectionManager<
AskCount
> {
protected override readonly utilityInstance: new (
data: DatabaseAskCount
data: DatabaseAskCount,
) => AskCount = AskCount;

override get defaultDocument(): DatabaseAskCount {
Expand Down
26 changes: 13 additions & 13 deletions src/database/managers/aliceDb/BirthdayCollectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { DatabaseCollectionManager } from "@alice-database/managers/DatabaseCollectionManager";
import { Birthday } from "@alice-database/utils/aliceDb/Birthday";
import { DatabaseCollectionManager } from "@database/managers/DatabaseCollectionManager";
import { Birthday } from "@database/utils/aliceDb/Birthday";
import { DatabaseBirthday } from "structures/database/aliceDb/DatabaseBirthday";
import { OperationResult } from "structures/core/OperationResult";
import { NumberHelper } from "@alice-utils/helpers/NumberHelper";
import { NumberHelper } from "@utils/helpers/NumberHelper";
import { Snowflake } from "discord.js";
import { BirthdayCollectionManagerLocalization } from "@alice-localization/database/managers/aliceDb/BirthdayCollectionManager/BirthdayCollectionManagerLocalization";
import { Language } from "@alice-localization/base/Language";
import { BirthdayCollectionManagerLocalization } from "@localization/database/managers/aliceDb/BirthdayCollectionManager/BirthdayCollectionManagerLocalization";
import { Language } from "@localization/base/Language";

/**
* A manager for the `birthday` collection.
Expand All @@ -15,7 +15,7 @@ export class BirthdayCollectionManager extends DatabaseCollectionManager<
Birthday
> {
protected override readonly utilityInstance: new (
data: DatabaseBirthday
data: DatabaseBirthday,
) => Birthday = Birthday;

override get defaultDocument(): DatabaseBirthday {
Expand Down Expand Up @@ -55,15 +55,15 @@ export class BirthdayCollectionManager extends DatabaseCollectionManager<
month: number,
timezone: number,
language: Language = "en",
force?: boolean
force?: boolean,
): Promise<OperationResult> {
const localization: BirthdayCollectionManagerLocalization =
this.getLocalization(language);

if ((await this.hasSet(userId)) && !force) {
return this.createOperationResult(
false,
localization.getTranslation("birthdayIsSet")
localization.getTranslation("birthdayIsSet"),
);
}

Expand All @@ -83,21 +83,21 @@ export class BirthdayCollectionManager extends DatabaseCollectionManager<
if (!NumberHelper.isNumberInRange(date, 1, maxDate, true)) {
return this.createOperationResult(
false,
localization.getTranslation("invalidDate")
localization.getTranslation("invalidDate"),
);
}

if (!NumberHelper.isNumberInRange(month, 0, 11, true)) {
return this.createOperationResult(
false,
localization.getTranslation("invalidMonth")
localization.getTranslation("invalidMonth"),
);
}

if (!NumberHelper.isNumberInRange(timezone, -12, 14, true)) {
return this.createOperationResult(
false,
localization.getTranslation("invalidTimezone")
localization.getTranslation("invalidTimezone"),
);
}

Expand All @@ -118,7 +118,7 @@ export class BirthdayCollectionManager extends DatabaseCollectionManager<
isLeapYear: isLeapYear,
},
},
{ upsert: true }
{ upsert: true },
);

return this.createOperationResult(true);
Expand All @@ -140,7 +140,7 @@ export class BirthdayCollectionManager extends DatabaseCollectionManager<
* @param language The language to localize.
*/
private getLocalization(
language: Language
language: Language,
): BirthdayCollectionManagerLocalization {
return new BirthdayCollectionManagerLocalization(language);
}
Expand Down
8 changes: 4 additions & 4 deletions src/database/managers/aliceDb/ChallengeCollectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DatabaseCollectionManager } from "@alice-database/managers/DatabaseCollectionManager";
import { Challenge } from "@alice-database/utils/aliceDb/Challenge";
import { DatabaseCollectionManager } from "@database/managers/DatabaseCollectionManager";
import { Challenge } from "@database/utils/aliceDb/Challenge";
import { DatabaseChallenge } from "structures/database/aliceDb/DatabaseChallenge";
import { ChallengeType } from "structures/challenge/ChallengeType";

Expand All @@ -11,7 +11,7 @@ export class ChallengeCollectionManager extends DatabaseCollectionManager<
Challenge
> {
protected override readonly utilityInstance: new (
data: DatabaseChallenge
data: DatabaseChallenge,
) => Challenge = Challenge;

override get defaultDocument(): DatabaseChallenge {
Expand Down Expand Up @@ -56,7 +56,7 @@ export class ChallengeCollectionManager extends DatabaseCollectionManager<
challengeid: {
$regex: new RegExp(
`${type === "weekly" ? "w" : "d"}\\d{1,}`,
"g"
"g",
),
},
},
Expand Down
10 changes: 5 additions & 5 deletions src/database/managers/aliceDb/ChannelDataCollectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DatabaseCollectionManager } from "@alice-database/managers/DatabaseCollectionManager";
import { ChannelActivity } from "@alice-database/utils/aliceDb/ChannelActivity";
import { DatabaseChannelActivity } from "@alice-structures/database/aliceDb/DatabaseChannelActivity";
import { DatabaseCollectionManager } from "@database/managers/DatabaseCollectionManager";
import { ChannelActivity } from "@database/utils/aliceDb/ChannelActivity";
import { DatabaseChannelActivity } from "@structures/database/aliceDb/DatabaseChannelActivity";
import { Collection as DiscordCollection } from "discord.js";

/**
Expand All @@ -11,7 +11,7 @@ export class ChannelActivityCollectionManager extends DatabaseCollectionManager<
ChannelActivity
> {
protected override readonly utilityInstance: new (
data: DatabaseChannelActivity
data: DatabaseChannelActivity,
) => ChannelActivity = ChannelActivity;

override get defaultDocument(): DatabaseChannelActivity {
Expand All @@ -33,7 +33,7 @@ export class ChannelActivityCollectionManager extends DatabaseCollectionManager<
*/
getFromTimestampRange(
from: number,
to: number
to: number,
): Promise<DiscordCollection<number, ChannelActivity>> {
return this.get("timestamp", {
timestamp: {
Expand Down
10 changes: 5 additions & 5 deletions src/database/managers/aliceDb/ClanAuctionCollectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DatabaseCollectionManager } from "@alice-database/managers/DatabaseCollectionManager";
import { ClanAuction } from "@alice-database/utils/aliceDb/ClanAuction";
import { DatabaseCollectionManager } from "@database/managers/DatabaseCollectionManager";
import { ClanAuction } from "@database/utils/aliceDb/ClanAuction";
import { DatabaseClanAuction } from "structures/database/aliceDb/DatabaseClanAuction";
import { Collection as DiscordCollection } from "discord.js";

Expand All @@ -11,7 +11,7 @@ export class ClanAuctionCollectionManager extends DatabaseCollectionManager<
ClanAuction
> {
protected override readonly utilityInstance: new (
data: DatabaseClanAuction
data: DatabaseClanAuction,
) => ClanAuction = ClanAuction;

override get defaultDocument(): DatabaseClanAuction {
Expand Down Expand Up @@ -45,7 +45,7 @@ export class ClanAuctionCollectionManager extends DatabaseCollectionManager<
* @returns The clan's auctions, mapped by their name.
*/
getClanAuctions(
clanName: string
clanName: string,
): Promise<DiscordCollection<string, ClanAuction>> {
return this.get("name", { auctioneer: clanName });
}
Expand All @@ -57,7 +57,7 @@ export class ClanAuctionCollectionManager extends DatabaseCollectionManager<
* @returns Auctions that have expired within the time limit.
*/
getExpiredAuctions(
timelimit: number
timelimit: number,
): Promise<DiscordCollection<string, ClanAuction>> {
return this.get("name", { expirydate: { $lte: timelimit } });
}
Expand Down
6 changes: 3 additions & 3 deletions src/database/managers/aliceDb/DPPAPIKeyCollectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DatabaseCollectionManager } from "@alice-database/managers/DatabaseCollectionManager";
import { DPPAPIKey } from "@alice-database/utils/aliceDb/DPPAPIKey";
import { DatabaseCollectionManager } from "@database/managers/DatabaseCollectionManager";
import { DPPAPIKey } from "@database/utils/aliceDb/DPPAPIKey";
import { DatabaseDPPAPIKey } from "structures/database/aliceDb/DatabaseDPPAPIKey";

/**
Expand All @@ -10,7 +10,7 @@ export class DPPAPIKeyCollectionManager extends DatabaseCollectionManager<
DPPAPIKey
> {
protected override readonly utilityInstance: new (
data: DatabaseDPPAPIKey
data: DatabaseDPPAPIKey,
) => DPPAPIKey = DPPAPIKey;

override get defaultDocument(): DatabaseDPPAPIKey {
Expand Down
10 changes: 5 additions & 5 deletions src/database/managers/aliceDb/DanCourseCollectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DanCourse } from "@alice-database/utils/aliceDb/DanCourse";
import { DatabaseDanCourse } from "@alice-structures/database/aliceDb/DatabaseDanCourse";
import { DanCourse } from "@database/utils/aliceDb/DanCourse";
import { DatabaseDanCourse } from "@structures/database/aliceDb/DatabaseDanCourse";
import { ApplicationCommandOptionChoiceData } from "discord.js";
import { DatabaseCollectionManager } from "../DatabaseCollectionManager";

Expand All @@ -11,7 +11,7 @@ export class DanCourseCollectionManager extends DatabaseCollectionManager<
DanCourse
> {
protected override utilityInstance: new (
data: DatabaseDanCourse
data: DatabaseDanCourse,
) => DanCourse = DanCourse;

override get defaultDocument(): DatabaseDanCourse {
Expand All @@ -36,7 +36,7 @@ export class DanCourseCollectionManager extends DatabaseCollectionManager<
*/
async searchBeatmapsForAutocomplete(
searchQuery: string | RegExp,
amount: number = 25
amount: number = 25,
): Promise<ApplicationCommandOptionChoiceData<string>[]> {
let regExp: RegExp;

Expand All @@ -49,7 +49,7 @@ export class DanCourseCollectionManager extends DatabaseCollectionManager<
const result: DatabaseDanCourse[] = await this.collection
.find(
{ courseName: regExp },
{ projection: { _id: 0, courseName: 1 } }
{ projection: { _id: 0, courseName: 1 } },
)
.limit(amount)
.toArray();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DanCourseLeaderboardScore } from "@alice-database/utils/aliceDb/DanCourseLeaderboardScore";
import { DatabaseDanCourseLeaderboardScore } from "@alice-structures/database/aliceDb/DatabaseDanCourseLeaderboardScore";
import { DatabaseDanCourseScore } from "@alice-structures/database/aliceDb/DatabaseDanCourseScore";
import { DanCourseLeaderboardScore } from "@database/utils/aliceDb/DanCourseLeaderboardScore";
import { DatabaseDanCourseLeaderboardScore } from "@structures/database/aliceDb/DatabaseDanCourseLeaderboardScore";
import { DatabaseDanCourseScore } from "@structures/database/aliceDb/DatabaseDanCourseScore";
import { DatabaseCollectionManager } from "../DatabaseCollectionManager";

/**
Expand All @@ -13,7 +13,7 @@ export class DanCourseLeaderboardScoreCollectionManager extends DatabaseCollecti
DanCourseLeaderboardScore
> {
protected override utilityInstance: new (
data: DatabaseDanCourseScore
data: DatabaseDanCourseScore,
) => DanCourseLeaderboardScore = DanCourseLeaderboardScore;

override get defaultDocument(): DatabaseDanCourseScore {
Expand Down Expand Up @@ -50,7 +50,7 @@ export class DanCourseLeaderboardScoreCollectionManager extends DatabaseCollecti
*/
async getLeaderboard(
hash: string,
page: number
page: number,
): Promise<DanCourseLeaderboardScore[]> {
const amountPerPage: number = 50;

Expand All @@ -74,7 +74,7 @@ export class DanCourseLeaderboardScoreCollectionManager extends DatabaseCollecti
*/
getScore(
uid: number,
hash: string
hash: string,
): Promise<DanCourseLeaderboardScore | null> {
return this.getOne({ uid: uid, hash: hash });
}
Expand Down
Loading

0 comments on commit f44ef8d

Please sign in to comment.