Elegram-api is a wrapper over the telegram bots api, but in the style of EO. More object-oriented, more maintainable.
This is a concept, if you have ideas, feel free to create an issue!
import Bot;
import Command;
import Update;
import BtDefault;
import java.util.Objects;
/**
* Simple example.
*/
class App() {
public static void main(String[] args) {
new BtDefault(
"your token",
new CmdStart()
).start();
}
}
// this is a temporary solution, it will be changed later
class CmdStart() extends Command {
@Override
public void act(final Update update, final Bot bot) {
if (Objects.equals("/start", update.message().text())) {
bot.sendMessage(
update.message().chatId(),
"Hi, this is a start command"
);
}
}
}
This project solves the problem of the existing telegram-bots-api, which for some reason isn't "Object-Oriented", here we can create a wrapper around the original API and make it more "Object-Oriented".
What do I mean when I say object-oriented?
So let's look at cactoos library, I think you get the idea.
Fork repository, make changes, send us a pull request.
We will review your changes and apply them to the master
branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:
mvn clean install -Pqulice
You will need Maven 3.3+ and Java 8+ installed
- Empty lines.
- Compound names.
- Incorrect formatting.
- Mutability.
- Getters/Setters.
- Static methods.
- Pull request with feature but without unit-tests.
This short list is supposed to make you understand that we aren't picking on you, it's just a level of quality below which we can't accept.
We're using this plugin to control naming for tests, please note that.
Looking forward to your pull-request!