You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: commands.rb
    path of file: ./repos/telegram-bot/lib/telegram/bot/updates_controller
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Telegram
  modul
    
          def command_from_text(text, username = nil)
            return unless text
            match = text.match(CMD_REGEX)
            return unless match
            mention = match[3]
            [match[1], text.split.drop(1)] if username == true || !mention || mention == username
          end