Skip to content

Commit f0ffe15

Browse files
Added platform version to Package.swift
Changed parseMode to MarkdownV2
1 parent 8a474f5 commit f0ffe15

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

NotifierBot/Package.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import PackageDescription
55

66
let package = Package(
77
name: "Notifier",
8+
platforms: [
9+
.macOS(.v10_14)
10+
],
811
products: [
912
.executable(
1013
name: "Notifier",

NotifierBot/Sources/Notifier/JFErrorHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class JFErrorHandler {
1616

1717
func sendError(_ userMessage: String) {
1818
if let chatID = update.message?.chat.id {
19-
_ = try? bot.sendMessage(params: .init(chatId: .chat(chatID), text: userMessage, parseMode: .markdown, disableWebPagePreview: true, disableNotification: true))
19+
_ = try? bot.sendMessage(userMessage, to: chatID)
2020
}
2121
}
2222

NotifierBot/Sources/Notifier/JFUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ extension Bot {
9999

100100
/// Sends a message with the default parameters for this bot
101101
@discardableResult
102-
func sendMessage(_ text: String, to chatID: Int64, parseMode: ParseMode? = .markdown, disableWebPagePreview: Bool? = true,
102+
func sendMessage(_ text: String, to chatID: Int64, parseMode: ParseMode? = .markdownV2, disableWebPagePreview: Bool? = true,
103103
disableNotification: Bool? = true, replyToMessageId: Int? = nil, replyMarkup: ReplyMarkup? = nil) throws -> Future<Message> {
104104
return try self.sendMessage(params: .init(chatId: .chat(chatID), text: text, parseMode: parseMode, disableWebPagePreview: disableWebPagePreview,
105105
disableNotification: disableNotification, replyToMessageId: replyToMessageId, replyMarkup: replyMarkup))

0 commit comments

Comments
 (0)