lib/te_bot/cable.rb in te_bot-0.3.0 vs lib/te_bot/cable.rb in te_bot-0.4.0

- old
+ new

@@ -1,22 +1,15 @@ # frozen_string_literal: true module TeBot - class Cable - attr_reader :message, :params - def initialize(wire, message, params = {}) - @wire = wire - @message = message - @params = params - end - + module Cable def chat_id - @message.data&.chat_id + message.data&.chat_id end def reply(**payload) return if chat_id.nil? - @wire.send_message chat_id, **payload + wire.send_message chat_id, **payload end end end