This repository has been archived on 2024-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
zhabogram/zhabogram.rb
annelin 08540206f0 Renamed files and libs
Added config file (config.yml)
Changed logger implementation
Correct Telegram session terminating
2019-04-06 10:29:48 +03:00

13 lines
560 B
Ruby

# Some very important libraries'
require 'yaml'
require 'logger'
require_relative 'inc/telegramclient'
require_relative 'inc/xmppcomponent'
# Configuration file #
Config = YAML.load_file(File.dirname(__FILE__) + '/config.yml')
# Configure Telegram Client #
TelegramClient.configure(api_id: Config['telegram']['api_id'], api_hash: Config['telegram']['api_hash'], verbosity: Config['telegram']['verbosity'])
XMPPComponent.new().connect(host: Config['xmpp']['host'], port: Config['xmpp']['port'], jid: Config['xmpp']['jid'], secret: Config['xmpp']['secret'])