Skip to content

Commit

Permalink
chore: smol things
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Dec 2, 2023
1 parent 3ac3a34 commit ff5ac03
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 208 deletions.
205 changes: 0 additions & 205 deletions src.old/commands/Highlight/block.ts

This file was deleted.

13 changes: 13 additions & 0 deletions src/Highlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ const client = new HighlightClient({
loadDefaultErrorListeners: false,
});

// Graceful shutdown
(
[
'SIGTERM', //
'SIGINT',
] as const
).forEach((event) =>
process.on(event, async () => {
container.logger.info(`${event} signal received, shutting down...`);
await client.destroy();
}),
);

try {
await client.login();
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// #region Env Setup
import { rootDir } from '#utils/misc';
import { setup, type ArrayString, type NumberString } from '@skyra/env-utilities';

setup({ path: new URL('.env', rootDir) });
Expand Down Expand Up @@ -155,7 +156,6 @@ declare module '@sapphire/pieces' {

// #region Highlight manager
import { HighlightManager } from '#structures/HighlightManager';
import { rootDir } from '#utils/misc';

container.highlightManager = new HighlightManager();

Expand Down
2 changes: 0 additions & 2 deletions src/lib/utils/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ export function pluralize(count: number, singular: string, plural: string) {
return count === 1 ? singular : plural;
}

// @ts-ignore - For tests
export const andList = new Intl.ListFormat('en-US', { type: 'conjunction', style: 'long' });

// @ts-ignore - For tests
export const orList = new Intl.ListFormat('en-US', { type: 'disjunction', style: 'long' });

export const enum Emojis {
Expand Down

0 comments on commit ff5ac03

Please sign in to comment.