29 lines
975 B
Java
29 lines
975 B
Java
package com.myoa.engineering.music.soundhoundfound.receiver;
|
|
|
|
import com.myoa.engineering.music.soundhoundfound.receiver.dispatch.MessageHandler;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.telegram.telegrambots.meta.TelegramBotsApi;
|
|
import org.telegram.telegrambots.meta.exceptions.TelegramApiException;
|
|
import org.telegram.telegrambots.updatesreceivers.DefaultBotSession;
|
|
|
|
/**
|
|
* ReceiverApplication
|
|
* @author Shin Woo-jin (woo-jin.shin@linecorp.com)
|
|
* @since 2021-08-20
|
|
*
|
|
*/
|
|
@SpringBootApplication
|
|
public class ReceiverApplication {
|
|
|
|
public static void main(String[] args) {
|
|
SpringApplication.run(ReceiverApplication.class, args);
|
|
try {
|
|
TelegramBotsApi api = new TelegramBotsApi(DefaultBotSession.class);
|
|
api.registerBot(new MessageHandler());
|
|
} catch(TelegramApiException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|