mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-18 15:01:38 +01:00
redeem management commands now reply to the instruction (oops i forgor)
This commit is contained in:
@@ -9,11 +9,11 @@ export default new Command({
|
||||
disableable: false,
|
||||
execution: async msg => {
|
||||
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]);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -9,11 +9,11 @@ export default new Command({
|
||||
disableable: false,
|
||||
execution: async msg => {
|
||||
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]);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user