import logger from './helpers/logger.ts' /** * Webhook * * @author Björn Hase * @license http://opensource.org/licenses/MIT The MIT License * @link https://git.node001.net/HerrHase/super-hog.git * */ class Webhook { static send(message: string) { const query = new URLSearchParams({ 'message': message }) try { fetch(process.env.WEBHOOK_URL + '?' + query.toString()) } catch(error) { logger().error(error) } } } export default Webhook