Closed xTheDoctah closed 4 years ago
Solved, i forgot to implement the constructor of the telegramLongPollingCommandBot.(basically the botname misses)
But there's no way to set it up. Theres a constructor but its also deprecated.
Final solution was add super(new DefaultBotOptions(), false); to the constructor of the bot
When i type the command /start on the bot i got this error. Actually the classes are like this.
and
Pom:
Stacktrace:
java.lang.NullPointerException: null at java.util.regex.Pattern.quote(Pattern.java:1291) ~[na:1.8.0_181] at org.telegram.telegrambots.extensions.bots.commandbot.commands.CommandRegistry.removeUsernameFromCommandIfNeeded(CommandRegistry.java:126) ~[telegrambotsextensions-4.5.jar:na] at org.telegram.telegrambots.extensions.bots.commandbot.commands.CommandRegistry.executeCommand(CommandRegistry.java:103) ~[telegrambotsextensions-4.5.jar:na] at org.telegram.telegrambots.extensions.bots.commandbot.TelegramLongPollingCommandBot.onUpdateReceived(TelegramLongPollingCommandBot.java:78) ~[telegrambotsextensions-4.5.jar:na] at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_181] at org.telegram.telegrambots.meta.generics.LongPollingBot.onUpdatesReceived(LongPollingBot.java:27) ~[telegrambots-meta-4.5.jar:na] at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$HandlerThread.run(DefaultBotSession.java:312) ~[telegrambots-4.5.jar:na]