
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
TARS is a wrapper of Telegram Bot API with WebHook support using WEBrick as HTTP server.
This is under heavy developpement, more coming soon
Add this line to your application's Gemfile:
gem 'tars'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tars
require 'tars'
TARS.configure do |config|
config.token = '<YOUR_TOKEN>'
config.webhook = 'https://protosify.fr/tars'
config.server = {
port: 8443,
path: '/tars'
}
end
TARS.bot.on 'Hello' do |update|
message = update.instance_variable_get('@message')
puts message['chat']['id']
from = message['from']['first_name']
TARS::API.reply_to(message['chat']['id'], "Whoop whoop whoop #{from}")
end
TARS.bootstrap
TARS.configure
:
This configuration block allow you to specify your bot settings. Options are:
token
: This is your bot token, keep it private. To obtain your bot token you should talk to the @botFather and register your bot.
webhook
: The URL that telegram will use to send you update each time your bot receive a message. This URL should point to this bot server where you run TARS. It's should be in HTTPS with a valid SSL certificate. See How to run TARS behind Nginx below for more information about configuring SSL.
server.port
: The port of the local TARS server. This can be anything if you don't want to use TARS behind a reverse proxy. However it should be a valid port handled by Telegram Bot API (Currently 80, 443, 8443)
server.path
: The prefix of the URL to access TARS server. This could be anything
Note: The server Hash can contain any WEBrick params so you can set SSL directly with TARS. See How to run TARS with WEBrick and SSL for more informations.
on
as first parametergit checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that tars demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.