redeem management commands now reply to the instruction (oops i forgor)

This commit is contained in:
2025-09-25 19:42:19 +02:00
parent 76bf3d34a8
commit 1afac5d5fa
2 changed files with 6 additions and 6 deletions

View File

@@ -9,11 +9,11 @@ export default new Command({
disableable: false, disableable: false,
execution: async msg => { execution: async msg => {
const args = parseCommandArgs(msg.messageText); const args = parseCommandArgs(msg.messageText);
if (!args[0]) { await sendMessage("Please specify a point redemption to disable"); return; }; if (!args[0]) { await sendMessage("Please specify a point redemption to disable", msg.messageId); return; };
const selection = namedRedeems.get(args[0]); const selection = namedRedeems.get(args[0]);
if (!selection) { await sendMessage(`Redeem ${args[0]} doesn't exist. The internal names for redeems are here: https://github.com/qwerinope/qweribot#point-redeems`); return; }; if (!selection) { await sendMessage(`Redeem ${args[0]} doesn't exist. The internal names for redeems are here: https://github.com/qwerinope/qweribot#point-redeems`, msg.messageId); return; };
const id = idMap.get(selection.name); const id = idMap.get(selection.name);
await disableRedeem(selection, id!); await disableRedeem(selection, id!);
await sendMessage(`The ${selection.name} point redeem is now disabled`); await sendMessage(`The ${selection.name} point redeem is now disabled`, msg.messageId);
} }
}); });

View File

@@ -9,11 +9,11 @@ export default new Command({
disableable: false, disableable: false,
execution: async msg => { execution: async msg => {
const args = parseCommandArgs(msg.messageText); const args = parseCommandArgs(msg.messageText);
if (!args[0]) { await sendMessage("Please specify a point redemption to enable"); return; }; if (!args[0]) { await sendMessage("Please specify a point redemption to enable", msg.messageId); return; };
const selection = namedRedeems.get(args[0]); const selection = namedRedeems.get(args[0]);
if (!selection) { await sendMessage(`Redeem ${args[0]} doesn't exist. The internal names for redeems are here: https://github.com/qwerinope/qweribot#point-redeems`); return; }; if (!selection) { await sendMessage(`Redeem ${args[0]} doesn't exist. The internal names for redeems are here: https://github.com/qwerinope/qweribot#point-redeems`, msg.messageId); return; };
const id = idMap.get(selection.name); const id = idMap.get(selection.name);
await enableRedeem(selection, id!); await enableRedeem(selection, id!);
await sendMessage(`The ${selection.name} point redeem is now enabled`); await sendMessage(`The ${selection.name} point redeem is now enabled`, msg.messageId);
} }
}); });