From 3a1eede58dd78dfb53804f4d4ce951862208d28e Mon Sep 17 00:00:00 2001 From: OleG Date: Sun, 6 Jun 2021 13:58:31 +0300 Subject: [PATCH 1/3] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 53f26d6..fb54174 100644 --- a/README.md +++ b/README.md @@ -125,3 +125,7 @@ let package = Package( ] ) ``` + +### Acknowledgments + +Inspired by [Telegrammer](https://github.com/givip/Telegrammer) From adbf34d7ea96e833a749b6b8724f63a454ed22da Mon Sep 17 00:00:00 2001 From: OleG Date: Tue, 8 Jun 2021 10:41:21 +0300 Subject: [PATCH 2/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fb54174..2f706fb 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ## Please support Swift Telegram Vapor Bot Lib development by giving a ⭐️ +### Telegram Bot based on Swift Vapor. + ### Example Here [Telegram-bot-example](https://github.com/nerzh/telegram-vapor-bot-lib/tree/master/Telegram-bot-example) From ddd44433b892b4fc9a744855f232a8c520bd8948 Mon Sep 17 00:00:00 2001 From: OleG Date: Tue, 8 Jun 2021 11:13:00 +0300 Subject: [PATCH 3/3] Update README.md --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2f706fb..5d907d0 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ -# telegram-vapor-bot-lib +# Telegram Vapor Bot ## Please support Swift Telegram Vapor Bot Lib development by giving a ⭐️ ### Telegram Bot based on Swift Vapor. ### Example Here -[Telegram-bot-example](https://github.com/nerzh/telegram-vapor-bot-lib/tree/master/Telegram-bot-example) +[Telegram-bot-example](https://github.com/nerzh/telegram-vapor-bot/tree/master/Telegram-bot-example) ### Usage #### create folder with your handlers **TGHandlers/DefaultBotHandlers.swift** ```swift import Vapor -import telegram_vapor_bot_lib +import telegram_vapor_bot final class DefaultBotHandlers { @@ -46,6 +46,8 @@ final class DefaultBotHandlers { #### for longpolling you should only configure vapor **configure.swift** ```swift +import telegram_vapor_bot + let tgApi: String = "XXXXXXXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" let connection: TGConnectionPrtcl = TGLongPollingConnection() TGBot.configure(connection: connection, botId: tgApi, vaporClient: app.client) @@ -64,6 +66,8 @@ DefaultBotHandlers.addHandlers(app: app, bot: TGBot.shared) #### vapor **configure.swift** ```swift +import telegram_vapor_bot + let tgApi: String = "XXXXXXXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" let connection: TGConnectionPrtcl = TGWebHookConnection(webHookURL: "https://your_domain/some_webhook_route") TGBot.configure(connection: connection, botId: tgApi, vaporClient: app.client) @@ -79,7 +83,7 @@ DefaultBotHandlers.addHandlers(app: app, bot: TGBot.shared) ```swift import Vapor -import telegram_vapor_bot_lib +import telegram_vapor_bot func routes(_ app: Application) throws {