Class: Telegram::Bot::Client

Inherits:
Object
  • Object
show all
Defined in:
sig/telegram/bot/core.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.

Parameters:

  • token (String)
  • options (Hash[Symbol, untyped])


25
# File 'sig/telegram/bot/core.rbs', line 25

def initialize: (String token, ?Hash[Symbol, untyped] options) -> void

Instance Attribute Details

#apiApi (readonly)

Returns the value of attribute api.

Returns:



20
21
22
# File 'sig/telegram/bot/core.rbs', line 20

def api
  @api
end

#loggerLogger

Returns the value of attribute logger.

Returns:

  • (Logger)


22
23
24
# File 'sig/telegram/bot/core.rbs', line 22

def logger
  @logger
end

#optionsHash[Symbol, untyped] (readonly)

Returns the value of attribute options.

Returns:

  • (Hash[Symbol, untyped])


21
22
23
# File 'sig/telegram/bot/core.rbs', line 21

def options
  @options
end

Class Method Details

.runvoid

This method returns an undefined value.



24
# File 'sig/telegram/bot/core.rbs', line 24

def self.run: [T] (String token, ?Hash[Symbol, untyped] options) { (Client) -> T } -> T

Instance Method Details

#fetch_updates {|arg0| ... } ⇒ void

This method returns an undefined value.

Yields:

Yield Parameters:

Yield Returns:

  • (void)


29
# File 'sig/telegram/bot/core.rbs', line 29

def fetch_updates: () { (Types::Base?) -> void } -> void

#handle_updateTypes::Base?

Parameters:

Returns:



30
# File 'sig/telegram/bot/core.rbs', line 30

def handle_update: (Types::Update update) -> Types::Base?

#listen {|arg0| ... } ⇒ nil

Yields:

Yield Parameters:

Yield Returns:

  • (void)

Returns:

  • (nil)


27
# File 'sig/telegram/bot/core.rbs', line 27

def listen: () { (Types::Base?) -> void } -> nil

#runvoid

This method returns an undefined value.



26
# File 'sig/telegram/bot/core.rbs', line 26

def run: [T] () { (Client) -> T } -> T

#stopfalse

Returns:

  • (false)


28
# File 'sig/telegram/bot/core.rbs', line 28

def stop: () -> false