From c03186fdbde69be648be33c57793a2d83c5a8256 Mon Sep 17 00:00:00 2001 From: Butanediol Date: Fri, 13 Aug 2021 12:03:57 +0800 Subject: [PATCH] Make explanation optional in Poll --- API/TelegramAPIDefinition.yml | 2 +- Sources/TelegramBotSDK/Generated/Types.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API/TelegramAPIDefinition.yml b/API/TelegramAPIDefinition.yml index 449d4e7..ad32694 100644 --- a/API/TelegramAPIDefinition.yml +++ b/API/TelegramAPIDefinition.yml @@ -254,7 +254,7 @@ fields: - type: PollType - allows_multiple_answers: Bool - correct_option_id: Int? - - explanation: String + - explanation: String? - explanation_entities: MessageEntity[]? - open_period: Int? - close_date: Date? diff --git a/Sources/TelegramBotSDK/Generated/Types.swift b/Sources/TelegramBotSDK/Generated/Types.swift index e90debc..bf29bdc 100644 --- a/Sources/TelegramBotSDK/Generated/Types.swift +++ b/Sources/TelegramBotSDK/Generated/Types.swift @@ -467,11 +467,11 @@ public class Poll: Codable { public var type: PollType public var allowsMultipleAnswers: Bool public var correctOptionId: Int? - public var explanation: String + public var explanation: String? public var explanationEntities: [MessageEntity]? = [] public var openPeriod: Int? public var closeDate: Date? - public init(id: String, question: String, options: [PollOption], totalVoterCount: Int, isClosed: Bool, isAnonymous: Bool, type: PollType, allowsMultipleAnswers: Bool, correctOptionId: Int? = nil, explanation: String, explanationEntities: [MessageEntity]? = nil, openPeriod: Int? = nil, closeDate: Date? = nil) { + public init(id: String, question: String, options: [PollOption], totalVoterCount: Int, isClosed: Bool, isAnonymous: Bool, type: PollType, allowsMultipleAnswers: Bool, correctOptionId: Int? = nil, explanation: String? = nil, explanationEntities: [MessageEntity]? = nil, openPeriod: Int? = nil, closeDate: Date? = nil) { self.id = id self.question = question self.options = options