mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
fix: remove async from getUptimeFormatted
This commit is contained in:
1 parent
5558c0bca2
commit
4041404f01
4 files changed
+5
-5
No files matched your search
@@ -26,7 +26,7 @@ export async function getPlayerStatistics(client: ExtendedClient): Promise<strin
|
||||
|
||||
export async function getSystemStatus(executionId: string, extended: boolean): Promise<string> {
|
||||
if (!extended) {
|
||||
const uptimeString: string = await getUptimeFormatted({ executionId });
|
||||
const uptimeString: string = getUptimeFormatted({ executionId });
|
||||
const usedMemoryInMB: string = Math.ceil((await osu.mem.info()).usedMemMb).toLocaleString('en-US');
|
||||
const cpuUsage: number = await osu.cpu.usage();
|
||||
|
||||
@@ -35,7 +35,7 @@ export async function getSystemStatus(executionId: string, extended: boolean): P
|
||||
);
|
||||
}
|
||||
|
||||
const uptimeString: string = await getUptimeFormatted({ executionId });
|
||||
const uptimeString: string = getUptimeFormatted({ executionId });
|
||||
const totalMemoryInMb: string = Math.ceil((await osu.mem.info()).totalMemMb).toLocaleString('en-US');
|
||||
const cpuCores: number = osu.cpu.count();
|
||||
const platform: string = osu.os.platform();
|
||||
|
||||
@@ -2,7 +2,7 @@ import Discord, { Client } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../services/logger';
|
||||
|
||||
export const createClient = async ({ executionId }: { executionId: string }) => {
|
||||
export const createClient = async ({ executionId }: { executionId: string }): Promise<Client> => {
|
||||
const logger: Logger = loggerModule.child({
|
||||
module: 'utilFactory',
|
||||
name: 'createClient',
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Logger } from 'pino';
|
||||
import loggerModule from '../../services/logger';
|
||||
import { CreatePlayerParams } from '../../types/playerTypes';
|
||||
|
||||
export const createPlayer = async ({ client, executionId }: CreatePlayerParams) => {
|
||||
export const createPlayer = async ({ client, executionId }: CreatePlayerParams): Promise<Player> => {
|
||||
const logger: Logger = loggerModule.child({
|
||||
module: 'utilFactory',
|
||||
name: 'createPlayer',
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Logger } from 'pino';
|
||||
import loggerModule from '../../services/logger';
|
||||
import { GetUptimeFormattedParams } from '../../types/utilTypes';
|
||||
|
||||
export const getUptimeFormatted = async ({ executionId }: GetUptimeFormattedParams) => {
|
||||
export const getUptimeFormatted = ({ executionId }: GetUptimeFormattedParams): string => {
|
||||
const logger: Logger = loggerModule.child({
|
||||
module: 'utilSystem',
|
||||
name: 'getUptimeFormatted',
|
||||
|
||||
Reference in new issue
Block a user