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

com.petersamokhin.bots.sdk.Main Maven / Gradle / Ivy

There is a newer version: 0.1.3
Show newest version
package com.petersamokhin.bots.sdk;

import com.petersamokhin.bots.sdk.clients.Group;
import com.petersamokhin.bots.sdk.objects.Message;

/**
 * Created by PeterSamokhin on 07/08/2017 21:14
 */
public class Main {

    public static void main(String... args) {

        Group group = new Group(151083290, "0cb6de1b33ab9079e38bede6e188d5b089f25eeebb4d714562c356aa9a82c3d0b1dc37720145526308b6c");

        group.onCommand("/qr", message ->
                System.out.println("OnCommand: qr")
        );

        group.onCommand("/start", message ->
                System.out.println("OnCommand: start")
        );

        group.onSimpleTextMessage(message ->
                System.out.println("OnSimple")
        );

        group.onMessage(message ->
                System.out.println("OnMessage")
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy