refactor: improve code quality
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
import type { Command } from "~/commands";
|
||||
import { getLatestQuest } from "~/services/wov";
|
||||
import { askForGrinders } from "~/utils/quest";
|
||||
import { getLatestQuest } from "~/wov";
|
||||
import { askForGrinders } from "~/quests";
|
||||
import { replyError } from "~/discord";
|
||||
import type { Command } from "./index";
|
||||
|
||||
export const resultCommand: Command = async (message, args) => {
|
||||
const client = message.client;
|
||||
const quest = await getLatestQuest();
|
||||
await askForGrinders(quest, client);
|
||||
export const resultCommand: Command = {
|
||||
help: "Déclenche manuellement la publication des résultats de la dernière quête",
|
||||
handler: async (message) => {
|
||||
const quest = await getLatestQuest();
|
||||
if (!quest) {
|
||||
await replyError(message, "Impossible de récupérer la dernière quête.");
|
||||
return;
|
||||
}
|
||||
await askForGrinders(quest, message.client);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user