mirror of
https://github.com/thedrewen/protojx-manager.git
synced 2026-03-21 09:48:56 +01:00
fix(status): increase timeout for fetch request to 10 seconds
feat(types): add missing import for ButtonInteraction in type definitions
This commit is contained in:
@@ -108,7 +108,7 @@ export class StatusService {
|
||||
host.alive = res.alive;
|
||||
}else if(host.type === 'website'){
|
||||
try {
|
||||
const response = await fetch(host.host, { method: 'HEAD', signal: AbortSignal.timeout(3000) });
|
||||
const response = await fetch(host.host, { method: 'HEAD', signal: AbortSignal.timeout(10000) });
|
||||
host.alive = response.ok;
|
||||
} catch (error) {
|
||||
host.alive = false;
|
||||
|
||||
2
src/type.d.ts
vendored
2
src/type.d.ts
vendored
@@ -1,2 +1,4 @@
|
||||
import { ButtonInteraction, ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
|
||||
export type Host = { host: string, name: string, alive: boolean, type: 'ping' | 'website' };
|
||||
export type CommandDefinition = { data: SlashCommandBuilder, execute: (interaction: ChatInputCommandInteraction) => void, buttons?: { id: string, handle: (interaction: ButtonInteraction) => void}[]};
|
||||
Reference in New Issue
Block a user