/**
 * 
 */
package org.sylvani.bot.examples.hello.console;

import org.sylvani.bot.IActivity;
import org.sylvani.bot.ISession;
import org.sylvani.bot.connector.console.ConsoleConnector;
import org.sylvani.bot.dialogs.IDialog;
import org.sylvani.bot.universal.UniversalBot;
import org.sylvani.bot.util.Prompt;;

/**
 * @author Harald Kuhn
 *
 */
public class HelloBot extends UniversalBot {

	public HelloBot() {
		super(new ConsoleConnector());
	}

	public static void main(String[] args) {
		HelloBot bot = new HelloBot();

		bot.add(".*", new IDialog() {

			@Override
			public void handle(ISession session, IActivity activity) {
				session.send(Prompt.answer("Hello World", activity));
			}
		});

	}
}

@@ -50,52 +50,68 @@
 ello
-.console;%0D%0A%0D%0Aimport org.sylvani.bot.IActivit
+;%0D%0A%0D%0Aimport org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactor
 y;%0D%0A
@@ -134,23 +134,25 @@
 ni.bot.I
-Session
+Connector
 ;%0D%0Aimpor
@@ -183,23 +183,25 @@
 tor.
-console.Console
+telegram.Telegram
 Conn
@@ -239,17 +239,20 @@
 dialogs.
-I
+Echo
 Dialog;%0D
@@ -302,45 +302,8 @@
 Bot;
-%0D%0Aimport org.sylvani.bot.util.Prompt;
 ;%0D%0A%0D
@@ -395,331 +395,275 @@
 %0D%0A%09p
-ublic HelloBot() %7B%0D%0A%09%09super(new ConsoleConnector());%0D%0A%09%7D%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09HelloBot bot = new HelloBot();%0D%0A%0D%0A%09%09bot.add(%22.*%22, new IDialog() %7B%0D%0A%0D%0A%09%09%09@Override%0D%0A%09%09%09public void handle(ISession session, IActivity activity) %7B%0D%0A%09%09%09%09session.send(Prompt.answer(%22Hello World%22, activity));%0D%0A%09%09%09%7D%0D%0A%09%09%7D);%0D%0A
+rivate static Logger logger = LoggerFactory.getLogger(HelloBot.class);%0D%0A%0D%0A%09public HelloBot(IConnector connector) %7B%0D%0A%09%09super(connector);%0D%0A%0D%0A%09%09setWelcomeDialog(new EchoDialog());%0D%0A%09%7D%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09new HelloBot(new TelegramConnector());
 %0D%0A%09%7D

Hello World example of a bot