All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.khasanof.executors.matcher.SimpleVideosMatcher Maven / Gradle / Ivy

The newest version!
package org.khasanof.executors.matcher;

import org.khasanof.annotation.methods.HandleVideo;
import org.khasanof.annotation.methods.HandleVideos;
import org.khasanof.models.matcher.RepeatableMatcherParameters;
import org.khasanof.service.expression.MultiExpressionMatcherService;
import org.springframework.stereotype.Component;
import org.telegram.telegrambots.meta.api.objects.Message;

/**
 * @author Nurislom
 * @see org.khasanof.executors.matcher
 * @since 06.07.2023 23:42
 */
@Component
public class SimpleVideosMatcher extends MultiGenericMatcher {

    public SimpleVideosMatcher(GenericMatcher matcher, MultiExpressionMatcherService expressionMatcherService) {
        super(matcher, expressionMatcherService);
    }

    @Override
    public boolean matcher(HandleVideos annotation, Message value) {
        return expressionMatcherService.match(new RepeatableMatcherParameters(annotation.match(), annotation.value(), matcher, value));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy