 
 extension ZEGBot {
 
-	private func performRequest<Input, Output>(ofMethod method: String, payload: Input) -> Result<Output>
+	private func performRequest<Input, Output>(ofMethod method: String, payload: Input) throws -> Output
 		where Input: Encodable, Output: Decodable {
 			// Preparing the request.
 			let bodyData = (try? JSONEncoder().encode(payload))!

	                      title: String, address: String, foursquareId: String? = nil,
	                      to receiver: Sendable,
						  disableNotification: Bool? = nil,
						  replyMarkup: InlineKeyboardMarkup? = nil) -> Result<Message> {
		let payload = SendingPayload(content: .venue(latitude: latitude, longitude: longitude, title: title, address: address, foursquareId: foursquareId),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return performRequest(ofMethod: "sendVenue", payload: payload)
	}

	@discardableResult
	public func sendContact(phoneNumber: String, firstName: String, lastName: String? = nil,
	                        to receiver: Sendable,
							disableNotification: Bool? = nil,
							replyMarkup: InlineKeyboardMarkup? = nil) -> Result<Message> {
		let payload = SendingPayload(content: .contact(phoneNumber: phoneNumber, firstName: firstName, lastName: lastName),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return performRequest(ofMethod: "sendContact", payload: payload)
	}

	@discardableResult
	public func send(chatAction: ChatAction, toChat chatId: Int) -> Result<Bool> {
		let payload = SendingPayload(content: .chatAction(chatAction: chatAction),
									 chatId: chatId, replyToMessageId: nil, disableNotification: nil,
									 replyMarkup: nil)
		return performRequest(ofMethod: "sendChatAction", payload: payload)
	}

	@discardableResult
	public func deleteMessage(inChat chatId: Int, messageId: Int) -> Result<Bool> {
		return performRequest(ofMethod: "deleteMessage",
							  payload: ["chat_id": chatId, "message_id": messageId])
	}

	public func getFile(ofId fileId: String) -> Result<File> {
		return performRequest(ofMethod: "getFile", payload: ["file_id": fileId])
	}

	public func getChatAdministrators(ofChatWithId chatId: Int) -> Result<[ChatMember]> {
		return performRequest(ofMethod: "getChatAdministrators", payload: ["chat_id": chatId])
	}

	@discardableResult

	                 parseMode: ParseMode? = nil,
	                 disableWebPagePreview: Bool? = nil,
	                 disableNotification: Bool? = nil,
					 replyMarkup: InlineKeyboardMarkup? = nil) throws -> Message {
		let payload = SendingPayload(content: .message(text: text, parseMode: parseMode, disableWebPagePreview: disableWebPagePreview),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: replyMarkup)
		return try performRequest(ofMethod: "sendMessage", payload: payload)
	}

	@discardableResult
	public func forward(message: Message, to receiver: Sendable,
	                    disableNotification: Bool? = nil) throws -> Message {
		let payload = SendingPayload(content: .serverStoredContent(.message(chatId: message.chatId, messageId: message.messageId)),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return try performRequest(ofMethod: "forwardMessage", payload: payload)

	}

	@discardableResult
	public func send(_ sticker: Sticker, to receiver: Sendable,
					 disableNotification: Bool? = nil,
					 replyMarkup: InlineKeyboardMarkup? = nil) throws -> Message {
		let payload = SendingPayload(content: .serverStoredContent(.sticker(fileId: sticker.fileId)),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return try performRequest(ofMethod: "sendSticker", payload: payload)
	}

	@discardableResult
	public func send(_ photo: PhotoSize, caption: String? = nil, to receiver: Sendable,
					 disableNotification: Bool? = nil,
					 replyMarkup: InlineKeyboardMarkup? = nil) throws -> Message {
		let payload = SendingPayload(content: .serverStoredContent(.photo(fileId: photo.fileId, caption: caption)),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return try performRequest(ofMethod: "sendPhoto", payload: payload)
	}

	@discardableResult
	public func send(_ audio: Audio, caption: String? = nil, to receiver: Sendable,
					 disableNotification: Bool? = nil,
					 replyMarkup: InlineKeyboardMarkup? = nil) throws -> Message {
		let payload = SendingPayload(content: .serverStoredContent(.audio(fileId: audio.fileId, caption: caption)),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return try performRequest(ofMethod: "sendAudio", payload: payload)
	}

	@discardableResult
	public func send(_ document: Document, caption: String? = nil, to receiver: Sendable,
					 disableNotification: Bool? = nil,
					 replyMarkup: InlineKeyboardMarkup? = nil) throws -> Message {
		let payload = SendingPayload(content: .serverStoredContent(.document(fileId: document.fileId, caption: caption)),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return try performRequest(ofMethod: "sendDocument", payload: payload)
	}


	@discardableResult
	public func send(_ video: Video, caption: String? = nil, to receiver: Sendable,
					 disableNotification: Bool? = nil,
					 replyMarkup: InlineKeyboardMarkup? = nil) throws -> Message {
		let payload = SendingPayload(content: .serverStoredContent(.video(fileId: video.fileId, caption: caption)),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return try performRequest(ofMethod: "sendVideo", payload: payload)
	}

	@discardableResult
	public func send(_ voice: Voice, caption: String? = nil, to receiver: Sendable,
					 disableNotification: Bool? = nil,
					 replyMarkup: InlineKeyboardMarkup? = nil) throws -> Message {
		let payload = SendingPayload(content: .serverStoredContent(.voice(fileId: voice.fileId, caption: caption)),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return try performRequest(ofMethod: "sendVoice", payload: payload)
	}

	@discardableResult
	public func sendLocation(latitude: Double, longitude: Double, to receiver: Sendable,
							 disableNotification: Bool? = nil,
							 replyMarkup: InlineKeyboardMarkup? = nil) throws -> Message {
		let payload = SendingPayload(content: .location(latitude: latitude, longitude: longitude),
		                             chatId: receiver.chatId,
		                             replyToMessageId: receiver.replyToMessageId,
									 disableNotification: disableNotification,
									 replyMarkup: nil)
		return try performRequest(ofMethod: "sendLocation", payload: payload)
	}

	@discardableResult
