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

org.isuper.telegram.models.Command Maven / Gradle / Ivy

Go to download

A java library which allows you to send messages(for now, more in the future) to telegram chats

There is a newer version: 0.1.24
Show newest version
/**
 * 
 */
package org.isuper.telegram.models;

import java.io.Serializable;

import org.isuper.common.utils.Preconditions;

/**
 * @author Super Wang
 *
 */
public class Command implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1956005239265903337L;
	
	public final String type;
	public final String toBot;
	public final String argument;
	
	/**
	 * @param type
	 * 				The type of command
	 * @param toBot
	 * 				The robot which send command to
	 * @param argument
	 * 				argument for command
	 */
	public Command(String type, String toBot, String argument) {
		if (Preconditions.isEmptyString(type)) {
			throw new IllegalArgumentException("Command type cannot be null or empty string!");
		}
		this.type = type.toLowerCase();
		this.toBot = toBot;
		this.argument = argument;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy