https://github.com/5aaee9/strap
Telegram Bot framework in Java
https://github.com/5aaee9/strap
telegram-bot
Last synced: 2 months ago
JSON representation
Telegram Bot framework in Java
- Host: GitHub
- URL: https://github.com/5aaee9/strap
- Owner: 5aaee9
- License: mit
- Created: 2018-09-12T10:03:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T04:56:30.000Z (over 7 years ago)
- Last Synced: 2025-03-15T00:12:36.145Z (over 1 year ago)
- Topics: telegram-bot
- Language: Kotlin
- Size: 85 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Strap
Yet, another Telegram Bot Framework
[](https://app.fossa.io/projects/git%2Bgithub.com%2FIndexyz%2FStrap?ref=badge_shield)
[](https://jitpack.io/#Indexyz/Strap)
## Create First Plugin
```java
import me.indexyz.strap.annotations.Command;
import me.indexyz.strap.annotations.Events;
import me.indexyz.strap.define.CommandContext;
@Events
public class FirstPlugin {
@Command("start")
public static void start(CommandContext context) {
context.reply("Hello, World");
}
}
```
Build it and put jar in plugins. Then run strap with java.
After first run, edit `config.properties` and put your bot Token into it.
Then it will response your command!
## Gradle Plugin
```grovy
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.Indexyz:Strap:master-SNAPSHOT'
}
```
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2FIndexyz%2FStrap?ref=badge_large)