Adjusted cooldowns and error handling
This commit is contained in:
@ -9,9 +9,9 @@ const openai = new OpenAI({
|
|||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ApplyOptions<Command.Options>({
|
@ApplyOptions<Command.Options>({
|
||||||
description: 'Pic... but better! Cooldown of 6 Minutes!',
|
description: 'Pic... but better! Cooldown of 10 Minutes!',
|
||||||
options: ['prompt'],
|
options: ['prompt'],
|
||||||
cooldownDelay: 600_000,
|
cooldownDelay: 1_000_000,
|
||||||
cooldownLimit: 1,
|
cooldownLimit: 1,
|
||||||
// Yes... I did hardcode myself.
|
// Yes... I did hardcode myself.
|
||||||
cooldownFilteredUsers: ['83679718401904640'],
|
cooldownFilteredUsers: ['83679718401904640'],
|
||||||
@ -91,7 +91,7 @@ export class UserCommand extends Command {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} 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) {
|
if (interactionOrMessage instanceof Message) {
|
||||||
return askMessage.edit({ content });
|
return askMessage.edit({ content });
|
||||||
|
@ -9,9 +9,9 @@ const openai = new OpenAI({
|
|||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ApplyOptions<Command.Options>({
|
@ApplyOptions<Command.Options>({
|
||||||
description: 'Generate a pic every 4 minutes!',
|
description: 'Generate a pic every 5 minutes!',
|
||||||
options: ['prompt'],
|
options: ['prompt'],
|
||||||
cooldownDelay: 400_000,
|
cooldownDelay: 500_000,
|
||||||
cooldownLimit: 1,
|
cooldownLimit: 1,
|
||||||
// Yes... I did hardcode myself.
|
// Yes... I did hardcode myself.
|
||||||
cooldownFilteredUsers: ['83679718401904640'],
|
cooldownFilteredUsers: ['83679718401904640'],
|
||||||
@ -91,7 +91,7 @@ export class UserCommand extends Command {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} 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) {
|
if (interactionOrMessage instanceof Message) {
|
||||||
return askMessage.edit({ content });
|
return askMessage.edit({ content });
|
||||||
|
Reference in New Issue
Block a user