Compare commits

...

11 Commits
0.0.1 ... 0.0.2

8 changed files with 56 additions and 37 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## 0.0.2
* `Versions`
* `tgbotapi`: `0.30.3` -> `0.30.4`
* `microutils`: `0.3.2` -> `0.3.3`
## 0.0.1
Inited :)

View File

@@ -1,28 +1,18 @@
# Telegram Bot Template
# PlaguBot
That is template for telegram bots based on next stack of technologies:
## For users
* [Kotlin Coroutines](https://github.com/Kotlin/kotlinx.coroutines)
* [Kotlin Serialization](https://github.com/Kotlin/kotlinx.serialization)
* [Telegram Bot API Library](https://github.com/InsanusMokrassar/TelegramBotAPI) (by default everything is included like
it was described [here](https://github.com/InsanusMokrassar/TelegramBotAPI#ok-where-should-i-start))
Template: [![Use template](badges/use_template.svg)](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/generate)
## Default
You can create your bot using
[this template](https://insanusmokrassar.github.io/PlaguBotBotTemplate/) by following of its instructions
Since you have used this repo as a template you can simply run command `./gradlew run --args="BOT_TOKEN"` (of course,
replace here `BOT_TOKEN` with your telegram bot token like `1234567890:ABCDEFGHIJKLM_OPqrstuvwxyz012345678`). As an
output you will get your bot information like:
## For developers
```bash
ExtendedBot(id=ChatId(chatId=1234567890), username=Username(username=@username_of_your_bot), firstName=Name of bot, lastName=, canJoinGroups=(some boolean), canReadAllGroupMessages=(some boolean), supportsInlineQueries=(some boolean))
```
| Template: | [![Use template](badges/use_template.svg)](https://github.com/InsanusMokrassar/PlaguBotPluginTemplate/generate) |
|-----------|-----------------------------------------------------------------------------------------------------------------|
| Bot version: | [![Download](https://api.bintray.com/packages/insanusmokrassar/PlaguBot/plagubot.bot/images/download.svg)](https://bintray.com/insanusmokrassar/PlaguBot/plagubot.bot/_latestVersion) |
| Plugin version: | [![Download](https://api.bintray.com/packages/insanusmokrassar/PlaguBot/plagubot.plugin/images/download.svg)](https://bintray.com/insanusmokrassar/PlaguBot/plagubot.plugin/_latestVersion) |
## What next?
There are several ways to continue:
* [Tutorials](https://bookstack.inmo.dev/books/telegrambotapi)
* [Github readme](https://github.com/InsanusMokrassar/TelegramBotAPI)
In other words, this template (and [TelegramBotAPI library](https://github.com/InsanusMokrassar/TelegramBotAPI)) does
not limit you on choosing of way to continue 😊
That is a set of libraries for plagubots. Look at the
[PlaguBot Plugin template](https://insanusmokrassar.github.io/PlaguBotPluginTemplate/) to find how to create your bot.

1
_config.yml Normal file
View File

@@ -0,0 +1 @@
theme: jekyll-theme-cayman

20
badges/use_template.svg Normal file
View File

@@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="104" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="a">
<rect width="104" height="20" rx="3" fill="#fff"/>
</clipPath>
<g clip-path="url(#a)">
<path fill="#555" d="M0 0h65v20H0z"/>
<path fill="#007ec6" d="M35 0h69v20H35z"/>
<path fill="url(#b)" d="M0 0h104v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
<text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Use</text>
<text x="175" y="140" transform="scale(.1)">Use</text>
<text x="690" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Template</text>
<text x="690" y="140" transform="scale(.1)">Template</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1017 B

View File

@@ -12,19 +12,19 @@ apply from: "publish.gradle"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_runtime_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.exposed:exposed-jdbc:$kotlin_exposed_version"
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
api "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_runtime_version"
api "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
api "org.jetbrains.exposed:exposed-jdbc:$kotlin_exposed_version"
implementation "dev.inmo:tgbotapi:$tgbotapi_version"
implementation "dev.inmo:micro_utils.repos.exposed:$microutils_version"
api "dev.inmo:tgbotapi:$tgbotapi_version"
api "dev.inmo:micro_utils.repos.exposed:$microutils_version"
implementation "com.github.matfax.klassindex:library:$klassindex_version"
api "com.github.matfax.klassindex:library:$klassindex_version"
kapt "com.github.matfax.klassindex:processor:$klassindex_version"
implementation "org.xerial:sqlite-jdbc:$sqlite_version"
api "org.xerial:sqlite-jdbc:$sqlite_version"
implementation project(":plagubot.plugin")
api project(":plagubot.plugin")
}
application {

View File

@@ -18,6 +18,8 @@ if (new File(projectDir, "secret.gradle").exists()) {
githubRelease {
token "${project.property('GITHUB_RELEASE_TOKEN')}"
releaseAssets.from('bot/build/distributions')
owner "InsanusMokrassar"
repo "PlaguBot"

View File

@@ -8,8 +8,8 @@ kotlin_version=1.4.10
kotlin_coroutines_version=1.4.1
kotlin_serialisation_runtime_version=1.0.1
kotlin_exposed_version=0.28.1
tgbotapi_version=0.30.3
microutils_version=0.3.2
tgbotapi_version=0.30.4
microutils_version=0.3.3
klassindex_version=4.1.0-rc.1
sqlite_version=3.30.1
@@ -17,4 +17,4 @@ gradle_bintray_plugin_version=1.8.5
github_release_plugin_version=2.2.12
group=dev.inmo
version=0.0.1
version=0.0.2

View File

@@ -10,8 +10,8 @@ apply from: "publish.gradle"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_runtime_version"
api "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_runtime_version"
implementation "dev.inmo:tgbotapi:$tgbotapi_version"
implementation "dev.inmo:micro_utils.repos.exposed:$microutils_version"
api "dev.inmo:tgbotapi:$tgbotapi_version"
api "dev.inmo:micro_utils.repos.exposed:$microutils_version"
}