mirror of https://github.com/Hypfer/Valetudo.git
18 lines
512 B
JavaScript
18 lines
512 B
JavaScript
const ValetudoEventHandler = require("./ValetudoEventHandler");
|
|
|
|
class DismissibleValetudoEventHandler extends ValetudoEventHandler {
|
|
/**
|
|
* @param {ValetudoEventHandler.INTERACTIONS} interaction
|
|
* @returns {Promise<boolean>}
|
|
*/
|
|
async interact(interaction) {
|
|
if (interaction === ValetudoEventHandler.INTERACTIONS.OK) {
|
|
return true;
|
|
} else {
|
|
throw new Error("Invalid Interaction");
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = DismissibleValetudoEventHandler;
|