fix: supported preconcurrency of swift methods sdk

This commit is contained in:
Konrad Geletey 2024-10-19 18:14:11 +03:00
parent 77672b5c2a
commit a11d671942
Signed by: kglt
GPG key ID: 386DEE24B60BD996
4 changed files with 4 additions and 5 deletions

View file

@ -1,5 +1,5 @@
import Vapor
import SwiftTelegramSdk
@preconcurrency import SwiftTelegramSdk
final class DefaultBotHandlers {
static func addHandlers() async {

View file

@ -1,4 +1,4 @@
import SwiftTelegramSdk
@preconcurrency import SwiftTelegramSdk
actor TGBotActor {
private var _bot: TGBot!

View file

@ -1,6 +1,6 @@
import Foundation
import Vapor
import SwiftTelegramSdk
@preconcurrency import SwiftTelegramSdk
public func configure(_ app: Application) async throws {
guard let tgApi: String = Environment.get("TG_BOT_API") else { throw Errors.notVariable("Telegram key is not defined")}

View file

@ -12,7 +12,6 @@ let app: Application = try await Application.make(env, Application.EventLoopGrou
let botActor: TGBotActor = .init()
defer { app.shutdown() }
try await configure(app)
try await app.execute()
try await app.asyncShutdown()