Created
June 17, 2019 06:31
-
-
Save watzon/d18b91136499f6b30ff068acb141be5d to your computer and use it in GitHub Desktop.
Files for Tourmaline docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tourmaline-bot | |
version: 0.1.0 | |
authors: | |
- Your Mane <your@email.me> | |
crystal: 0.28.0 | |
dependencies: | |
tourmaline: | |
github: watzon/tourmaline | |
license: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "tourmaline" | |
bot = Tourmaline::Bot::Client.new(ENV["API_KEY"]) | |
bot.command("echo") do |message, params| | |
text = params.join(" ") | |
bot.send_message(message.chat.id, text) | |
bot.delete_message(message.chat.id, message.message_id) | |
end | |
bot.poll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment