Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nerzh/telegram-vapor-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzh committed May 29, 2024
2 parents a2e8ed5 + e5ca915 commit 40ebaab
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Sources/TelegramVaporBot/Telegrammer/Errors/BotError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class BotError: ErrorCommon {
self.description = "\(Self.self)"
}

public init(type: Type, description: String = "", reason: String = "") {
public init(type: Type, description: String = "<No description provided>", reason: String = "<No reason provided>") {
self.type = type
self.description = description
self.reason = reason
Expand Down
23 changes: 0 additions & 23 deletions Sources/TelegramVaporBot/Telegrammer/Helpers/Constants.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public extension Error {
case .valueNotFound(_, let context):
errorDescription = context.debugDescription
@unknown default:
errorDescription = "Uknown DecodingError"
errorDescription = "Unknown DecodingError"
}
} else {
errorDescription = "Cannot detect error type, providing default description:\n\(self.localizedDescription)"
Expand Down
4 changes: 2 additions & 2 deletions Telegram-bot-example/Sources/Telegram-bot-example/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import TelegramVaporBot
var env = try Environment.detect()
try LoggingSystem.bootstrap(from: &env)
let eventLoop: EventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount * 4)
let app: Application = .init(env, Application.EventLoopGroupProvider.shared(eventLoop))
let app: Application = try await Application.make(env, Application.EventLoopGroupProvider.shared(eventLoop))
let TGBOT: TGBotConnection = .init()

defer { app.shutdown() }
try await configure(app)
try app.run()
try await app.execute()

0 comments on commit 40ebaab

Please sign in to comment.