2024-10-19 17:39:04 +03:00
|
|
|
// The Swift Programming Language
|
|
|
|
// https://docs.swift.org/swift-book
|
|
|
|
|
|
|
|
import Vapor
|
|
|
|
import SwiftTelegramSdk
|
|
|
|
|
|
|
|
var env = try Environment.detect()
|
|
|
|
try LoggingSystem.bootstrap(from: &env)
|
|
|
|
|
|
|
|
let eventLoop: EventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount * 4)
|
|
|
|
let app: Application = try await Application.make(env, Application.EventLoopGroupProvider.shared(eventLoop))
|
|
|
|
|
|
|
|
let botActor: TGBotActor = .init()
|
|
|
|
|
|
|
|
try await configure(app)
|
|
|
|
try await app.execute()
|
2024-10-19 18:14:11 +03:00
|
|
|
try await app.asyncShutdown()
|