ahegao 1.69.46 → 1.69.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -0
- package/dist/index.js +25 -9
- package/dist/index.js.map +1 -0
- package/dist/json/downside.json +75 -0
- package/dist/json/hiragana.json +527 -0
- package/dist/json/homoglyphs.json +31790 -0
- package/dist/json/letterArray.json +254 -0
- package/dist/json/superscript.json +96 -0
- package/dist/json/upside.json +78 -0
- package/dist/structures/structs.d.ts +77 -0
- package/dist/structures/structs.js +46 -45
- package/dist/structures/structs.js.map +1 -0
- package/dist/types/classes.d.ts +214 -0
- package/dist/types/classes.js +121 -122
- package/dist/types/classes.js.map +1 -0
- package/dist/types/discord_classes.d.ts +93 -0
- package/dist/types/discord_classes.js +140 -106
- package/dist/types/discord_classes.js.map +1 -0
- package/dist/types/discord_fields.d.ts +27 -0
- package/dist/types/discord_fields.js +28 -24
- package/dist/types/discord_fields.js.map +1 -0
- package/dist/types/discord_types.d.ts +51 -0
- package/dist/types/discord_types.js +6 -4
- package/dist/types/discord_types.js.map +1 -0
- package/dist/types/fields.d.ts +163 -0
- package/dist/types/fields.js +238 -232
- package/dist/types/fields.js.map +1 -0
- package/dist/types/types.d.ts +99 -0
- package/dist/types/types.js +3 -1
- package/dist/types/types.js.map +1 -0
- package/dist/utils/discord-util.d.ts +198 -0
- package/dist/utils/discord-util.js +370 -235
- package/dist/utils/discord-util.js.map +1 -0
- package/dist/utils/util.d.ts +504 -0
- package/dist/utils/util.js +1146 -694
- package/dist/utils/util.js.map +1 -0
- package/package.json +56 -57
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { FileInfo, RangedNumber } from "../structures/structs";
|
|
2
|
+
export declare class TitleAndArtists {
|
|
3
|
+
readonly artists: string[];
|
|
4
|
+
readonly artist: string;
|
|
5
|
+
readonly title: string;
|
|
6
|
+
readonly sanitized_for_seed_artist: string;
|
|
7
|
+
readonly sanitized_for_seed_title: string;
|
|
8
|
+
readonly seed: string;
|
|
9
|
+
readonly hash: string;
|
|
10
|
+
constructor(artists: string[], artist: string, title: string);
|
|
11
|
+
get artistsDashTitle(): string;
|
|
12
|
+
findGeniusLyrics(): Promise<string | undefined>;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace TitleAndArtists {
|
|
15
|
+
function fromFileInfo(fileInfo: FileInfo, aliases?: Aliases): Promise<TitleAndArtists>;
|
|
16
|
+
}
|
|
17
|
+
export declare class Aliases {
|
|
18
|
+
private reverseAliases;
|
|
19
|
+
add(name: string, ...aliases: string[]): Aliases;
|
|
20
|
+
get(name: string): string;
|
|
21
|
+
}
|
|
22
|
+
export declare const MUSIC_ARTIST_ALIASES: Aliases;
|
|
23
|
+
export declare namespace Compare {
|
|
24
|
+
enum NumberCompareOperator {
|
|
25
|
+
Equal = "equal",
|
|
26
|
+
NotEqual = "not_equal",
|
|
27
|
+
GreaterThan = "greater_than",
|
|
28
|
+
GreaterThanOrEqual = "greater_than_or_equal",
|
|
29
|
+
LessThan = "less_than",
|
|
30
|
+
LessThanOrEqual = "less_than_or_equal"
|
|
31
|
+
}
|
|
32
|
+
enum StringCompareOperator {
|
|
33
|
+
Equal = "equal",
|
|
34
|
+
NotEqual = "not_equal",
|
|
35
|
+
Contains = "contains",
|
|
36
|
+
NotContains = "not_contains",
|
|
37
|
+
StartsWith = "starts_with",
|
|
38
|
+
EndsWith = "ends_with"
|
|
39
|
+
}
|
|
40
|
+
type Operator = NumberCompareOperator | StringCompareOperator;
|
|
41
|
+
function fromString(input: string): Operator;
|
|
42
|
+
function compare(value: number | string, operator: Operator): boolean;
|
|
43
|
+
function number(value: number, operator: NumberCompareOperator): boolean;
|
|
44
|
+
function string(value: string, operator: StringCompareOperator): boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare class BoundedDeque<T> {
|
|
47
|
+
readonly maxSize: number;
|
|
48
|
+
private queue;
|
|
49
|
+
constructor(maxSize: number);
|
|
50
|
+
pushEnd(item: T): void;
|
|
51
|
+
pushFront(item: T): void;
|
|
52
|
+
popEnd(): T | undefined;
|
|
53
|
+
popFront(): T | undefined;
|
|
54
|
+
peekFront(): T | undefined;
|
|
55
|
+
peekEnd(): T | undefined;
|
|
56
|
+
get size(): number;
|
|
57
|
+
isEmpty(): boolean;
|
|
58
|
+
isFull(): boolean;
|
|
59
|
+
clear(): void;
|
|
60
|
+
toArray(): T[];
|
|
61
|
+
get array(): T[];
|
|
62
|
+
private trimFrontIfNeeded;
|
|
63
|
+
private trimBackIfNeeded;
|
|
64
|
+
}
|
|
65
|
+
export declare class Timer {
|
|
66
|
+
private _startMs;
|
|
67
|
+
private _lastIncrementMs;
|
|
68
|
+
private _count;
|
|
69
|
+
constructor();
|
|
70
|
+
reset(): void;
|
|
71
|
+
get startMs(): number;
|
|
72
|
+
get elapsedMs(): number;
|
|
73
|
+
get elapsedS(): number;
|
|
74
|
+
increment(incrementBy?: number, updateLoadingBar?: boolean): number;
|
|
75
|
+
get lastIncrementMs(): number;
|
|
76
|
+
get lastIncrementGapMs(): number;
|
|
77
|
+
get lastIncrementGapS(): number;
|
|
78
|
+
get count(): number;
|
|
79
|
+
get countPerSecond(): number;
|
|
80
|
+
get countPerSecondString(): string;
|
|
81
|
+
isFinished(goalCount: number): boolean;
|
|
82
|
+
getETASecondsForCount(goalCount: number): number;
|
|
83
|
+
getETASecondsForCountString(goalCount: number): string;
|
|
84
|
+
getCountAndPercentString(goalCount: number): string;
|
|
85
|
+
getFullStatsString(goalCount: number): string;
|
|
86
|
+
startLoadingBarForS(durationS: number, suffixDecider?: (() => string) | string, onFinish?: () => void, intervalMs?: number, rainbowIntervalMs?: number): NodeJS.Timeout;
|
|
87
|
+
updateLoadingBar: () => void;
|
|
88
|
+
startLoadingBarUntilDone(goalCountDecider: (() => number) | number, suffixDecider?: (() => string) | string, onFinish?: () => void, fullStats?: boolean, intervalMs?: number, rainbowIntervalMs?: number): NodeJS.Timeout;
|
|
89
|
+
startReplaceLastTerminalLineLoop(stringMaker: () => string, intervalMs?: number): NodeJS.Timeout;
|
|
90
|
+
}
|
|
91
|
+
export declare class NumberAnalysis {
|
|
92
|
+
private _lowest;
|
|
93
|
+
private _highest;
|
|
94
|
+
constructor(values?: Iterable<number>);
|
|
95
|
+
updateArray(buffer: Iterable<number>): void;
|
|
96
|
+
update(value: number): void;
|
|
97
|
+
get lowest(): number;
|
|
98
|
+
get highest(): number;
|
|
99
|
+
forEachLowestFirst(consumer: (value: number) => void): void;
|
|
100
|
+
forEachHighestFirst(consumer: (value: number) => void): void;
|
|
101
|
+
forEach(lowestFirst: boolean, consumer: (value: number) => void): void;
|
|
102
|
+
get gap(): number;
|
|
103
|
+
toRangedNumber(): RangedNumber;
|
|
104
|
+
toString(): string;
|
|
105
|
+
}
|
|
106
|
+
export declare class NumbersAnalysis extends NumberAnalysis {
|
|
107
|
+
private _sum;
|
|
108
|
+
readonly array: number[];
|
|
109
|
+
readonly map: Map<number, number>;
|
|
110
|
+
constructor(values?: Iterable<number>);
|
|
111
|
+
update(value: number): void;
|
|
112
|
+
get average(): number;
|
|
113
|
+
get sum(): number;
|
|
114
|
+
get count(): number;
|
|
115
|
+
sortedArray(ascending?: boolean): number[];
|
|
116
|
+
get median(): number;
|
|
117
|
+
getSortedFrequencyKeys(ascending?: boolean): number[];
|
|
118
|
+
toString(): string;
|
|
119
|
+
}
|
|
120
|
+
export declare class Lockable<T> {
|
|
121
|
+
private _locked;
|
|
122
|
+
private _item;
|
|
123
|
+
constructor(item: T);
|
|
124
|
+
get item(): T;
|
|
125
|
+
set item(item: T);
|
|
126
|
+
get locked(): boolean;
|
|
127
|
+
set locked(locked: boolean);
|
|
128
|
+
set(item: T): void;
|
|
129
|
+
get(): T;
|
|
130
|
+
lock(): void;
|
|
131
|
+
unlock(): void;
|
|
132
|
+
toString(): string;
|
|
133
|
+
}
|
|
134
|
+
export declare class Config {
|
|
135
|
+
readonly configPath: string;
|
|
136
|
+
private _init;
|
|
137
|
+
readonly name: string;
|
|
138
|
+
readonly basePath: string;
|
|
139
|
+
private readonly _config;
|
|
140
|
+
constructor(configPath?: string);
|
|
141
|
+
get isInit(): boolean;
|
|
142
|
+
throwIfNotInit(): void;
|
|
143
|
+
throwIfInit(error?: string): void;
|
|
144
|
+
define(key: string, value: number | string | boolean): Config;
|
|
145
|
+
get(key: string): number | string | boolean;
|
|
146
|
+
getString(key: string): string;
|
|
147
|
+
getNumber(key: string): number;
|
|
148
|
+
getBool(key: string): boolean;
|
|
149
|
+
is(key: string): boolean;
|
|
150
|
+
set(key: string, value: number | string | boolean): Config;
|
|
151
|
+
private _set;
|
|
152
|
+
init(): Config;
|
|
153
|
+
save(): Config;
|
|
154
|
+
toString(): string;
|
|
155
|
+
}
|
|
156
|
+
export declare class WeightedMap<T> {
|
|
157
|
+
private readonly _map;
|
|
158
|
+
private _totalWeight;
|
|
159
|
+
constructor();
|
|
160
|
+
add(item: T, weight?: number): WeightedMap<T>;
|
|
161
|
+
get(): T;
|
|
162
|
+
get empty(): boolean;
|
|
163
|
+
get hasItems(): boolean;
|
|
164
|
+
get size(): number;
|
|
165
|
+
}
|
|
166
|
+
export declare namespace WeightedMap {
|
|
167
|
+
function of<T>(input: T | T[]): WeightedMap<T>;
|
|
168
|
+
}
|
|
169
|
+
export type TextCompChild = TextCompObj | TextComp | string;
|
|
170
|
+
export type TextCompChildren = TextCompChild | (TextCompChild)[] | WeightedMap<TextComp>;
|
|
171
|
+
export type TextCompLookupMap = Map<string, WeightedMap<TextCompChild>>;
|
|
172
|
+
export interface TextCompObj {
|
|
173
|
+
text?: string;
|
|
174
|
+
weight?: number;
|
|
175
|
+
chance?: number;
|
|
176
|
+
continueToChildOnFail?: boolean;
|
|
177
|
+
children?: TextCompChildren;
|
|
178
|
+
}
|
|
179
|
+
export declare class TextComp {
|
|
180
|
+
readonly text: string;
|
|
181
|
+
readonly chance: number;
|
|
182
|
+
readonly continueToChildOnFail: boolean;
|
|
183
|
+
private readonly _children;
|
|
184
|
+
constructor(data: TextCompObj);
|
|
185
|
+
get hasChildren(): boolean;
|
|
186
|
+
getRandomChild(): TextComp;
|
|
187
|
+
generate(lookup?: TextCompLookupMap, separator?: string, text?: string): string;
|
|
188
|
+
toString(): string;
|
|
189
|
+
}
|
|
190
|
+
export declare namespace TextComp {
|
|
191
|
+
function of(item: TextCompChild): TextComp;
|
|
192
|
+
}
|
|
193
|
+
export declare class Pair<L, R> {
|
|
194
|
+
left: L;
|
|
195
|
+
right: R;
|
|
196
|
+
constructor(left: L, right: R);
|
|
197
|
+
static of(L: any, R: any): Pair<any, any>;
|
|
198
|
+
swap(): Pair<R, L>;
|
|
199
|
+
asArray(): [L, R];
|
|
200
|
+
equals(other: Pair<L, R>): boolean;
|
|
201
|
+
toString(): string;
|
|
202
|
+
}
|
|
203
|
+
export declare class Maybe<T> {
|
|
204
|
+
readonly value: T | null;
|
|
205
|
+
readonly present: boolean;
|
|
206
|
+
constructor(value: T | null);
|
|
207
|
+
orElseGet(value: () => T): T;
|
|
208
|
+
orElse(value: T): T;
|
|
209
|
+
}
|
|
210
|
+
export declare namespace Maybe {
|
|
211
|
+
const EMPTY: Maybe<any>;
|
|
212
|
+
function fromArray<T>(valuesArray: T[], index: number): Maybe<T>;
|
|
213
|
+
function of<T>(value: T | null): Maybe<T>;
|
|
214
|
+
}
|