/** * Copyright (C) 2018-2021 Christian Pierre MOMON * * This file is part of (April) Hebdobot. * * Hebdobot is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Hebdobot is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Hebdobot. If not, see */ package org.april.hebdobot.bot.hooks; import org.april.hebdobot.HebdobotException; import org.april.hebdobot.bot.Hebdobot; import fr.devinsy.strings.StringList; /** * The Class Hook. */ public abstract class Hook { /** * Attempt help. * * @param string * the string * @return the string list * @throws HebdobotException * the hebdobot exception */ public abstract StringList attemptHelp(final String string) throws HebdobotException; /** * Attempt process. * * @param bot * the bot * @param channel * the channel * @param sender * the sender * @param login * the login * @param hostname * the hostname * @param message * the message * @return true, if successful * @throws HebdobotException * the hebdobot exception */ public abstract boolean attemptProcess(Hebdobot bot, final String channel, final String sender, final String login, final String hostname, final String message) throws HebdobotException; /** * Gets the name. * * @return the name */ public String getName() { String result; result = this.getClass().getName().replace("Hook", ""); // return result; } }