Adjusted cooldowns and error handling

This commit is contained in:
2023-11-10 18:54:53 -07:00
parent dfbd1cb48c
commit a55b8b2f29
2 changed files with 6 additions and 6 deletions

View File

@ -9,9 +9,9 @@ const openai = new OpenAI({
// @ts-ignore
@ApplyOptions<Command.Options>({
description: 'Pic... but better! Cooldown of 6 Minutes!',
description: 'Pic... but better! Cooldown of 10 Minutes!',
options: ['prompt'],
cooldownDelay: 600_000,
cooldownDelay: 1_000_000,
cooldownLimit: 1,
// Yes... I did hardcode myself.
cooldownFilteredUsers: ['83679718401904640'],
@ -91,7 +91,7 @@ export class UserCommand extends Command {
});
}
} catch (error) {
const content = "Sorry, I can't complete the prompt for: " + prompt + '\n' + 'Error: ' + error;
const content = "Sorry, I can't complete the prompt for: " + prompt + '\n' + error;
if (interactionOrMessage instanceof Message) {
return askMessage.edit({ content });

View File

@ -9,9 +9,9 @@ const openai = new OpenAI({
// @ts-ignore
@ApplyOptions<Command.Options>({
description: 'Generate a pic every 4 minutes!',
description: 'Generate a pic every 5 minutes!',
options: ['prompt'],
cooldownDelay: 400_000,
cooldownDelay: 500_000,
cooldownLimit: 1,
// Yes... I did hardcode myself.
cooldownFilteredUsers: ['83679718401904640'],
@ -91,7 +91,7 @@ export class UserCommand extends Command {
});
}
} catch (error) {
const content = "Sorry, I can't complete the prompt for: " + prompt + '\n' + 'Error: ' + error;
const content = "Sorry, I can't complete the prompt for: " + prompt + '\n' + error;
if (interactionOrMessage instanceof Message) {
return askMessage.edit({ content });