Reformat code

pull/70/head
Skyler Grey 3 years ago
parent a325d264a3
commit 6a0bab5319
Signed by: Minion3665
GPG Key ID: 1AFD10256B3C714D

@ -144,12 +144,14 @@ export class Guilds {
} }
async staffChannels(): Promise<string[]> { async staffChannels(): Promise<string[]> {
const entries = (await this.guilds const entries = (
await this.guilds
.find( .find(
{ "logging.staff.channel": { $exists: true } }, { "logging.staff.channel": { $exists: true } },
{ projection: { "logging.staff.channel": 1, _id: 0 } } { projection: { "logging.staff.channel": 1, _id: 0 } }
) )
.toArray()).map((e) => e.logging.staff.channel); .toArray()
).map((e) => e.logging.staff.channel);
const out: string[] = []; const out: string[] = [];
for (const entry of entries) { for (const entry of entries) {
if (entry) out.push(entry); if (entry) out.push(entry);

@ -18,7 +18,7 @@ function getEmojiPaths(obj: EmojisIndex, path: string[] = []) {
} }
getEmojiPaths(emojis); getEmojiPaths(emojis);
function getEmojiByName(name: (typeof EMOJIPATHS)[number], format?: string): string { function getEmojiByName(name: typeof EMOJIPATHS[number], format?: string): string {
const parts = name.split("."); const parts = name.split(".");
let id: string | EmojisIndex | EmojisIndex[] | undefined = emojis; let id: string | EmojisIndex | EmojisIndex[] | undefined = emojis;
for (const part of parts) { for (const part of parts) {

@ -1,6 +1,7 @@
type RecursivePartial<T> = { type RecursivePartial<T> = {
[P in keyof T]?: [P in keyof T]?: T[P] extends (infer U)[]
T[P] extends (infer U)[] ? RecursivePartial<U>[] : ? RecursivePartial<U>[]
T[P] extends object ? RecursivePartial<T[P]> : : T[P] extends object
T[P]; ? RecursivePartial<T[P]>
: T[P];
}; };

Loading…
Cancel
Save