├── .gitignore ├── assets └── preview.gif ├── .github └── workflows │ ├── cargo-publish.yml │ └── binaries.yml ├── Cargo.toml ├── LICENSE ├── src ├── main.rs ├── lib │ ├── file_ext.rs │ ├── error.rs │ ├── send.rs │ └── mod.rs └── cli.yml ├── README.md └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /assets/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hermitter/tepe/HEAD/assets/preview.gif -------------------------------------------------------------------------------- /.github/workflows/cargo-publish.yml: -------------------------------------------------------------------------------- 1 | name: Cargo Publish 2 | on: 3 | push: 4 | tags: 5 | - v0.* 6 | 7 | jobs: 8 | build: 9 | name: Publish 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Publish Crate 13 | run: cargo publish --token ${{ secrets.CRATES_IO_API_KEY }} 14 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "tepe" 3 | version = "0.0.5" 4 | authors = ["Carlos Chacin"] 5 | edition = "2018" 6 | readme = "README.md" 7 | repository = "https://github.com/Hermitter/tepe" 8 | license = "MIT" 9 | description = "A CLI to command a bot to send messages and files over Telegram." 10 | 11 | [dependencies] 12 | teloxide = "0.3.4" 13 | tokio = { version = "0.2.11", features = ["rt-threaded", "macros"] } 14 | clap = {version = "2.33.1", features = ["yaml"]} 15 | lazy_static = "1.4.0" 16 | 17 | # Statically link openssl for binaries 18 | openssl = { version = '0.10', features = ["vendored"], optional = true } 19 | 20 | [features] 21 | vendored-openssl = ["openssl"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Carlos Chacin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | extern crate lazy_static; 3 | #[macro_use] 4 | extern crate clap; 5 | use clap::App; 6 | use std::ffi::OsString; 7 | pub mod lib; 8 | use lib::error::Error; 9 | 10 | #[tokio::main] 11 | async fn main() { 12 | run().await.unwrap_or_else(|error| error.exit()); 13 | } 14 | 15 | async fn run() -> Result<(), Error> { 16 | let yaml = load_yaml!("cli.yml"); 17 | let app = App::from_yaml(yaml).get_matches(); 18 | 19 | // Handle each command 20 | match app.subcommand() { 21 | ("test", Some(sub_cmd)) => { 22 | lib::TelegramBot::from_clap(sub_cmd)? 23 | .reply_chat_id() 24 | .await?; 25 | } 26 | 27 | ("send", Some(sub_cmd)) => { 28 | let tepe = lib::TelegramBot::from_clap(&sub_cmd)?; 29 | 30 | let mut files = &Vec::::new(); 31 | let mut message = None; 32 | 33 | // get file paths 34 | if let Some(file_args) = sub_cmd.args.get("files") { 35 | files = &file_args.vals; 36 | } 37 | 38 | // get message 39 | if let Some(message_arg) = sub_cmd.args.get("message") { 40 | message = message_arg.vals[0].to_str(); 41 | } 42 | 43 | tepe.send(message, files).await?; 44 | } 45 | _ => return Err(Error::NoInput), 46 | }; 47 | 48 | Ok(()) 49 | } 50 | -------------------------------------------------------------------------------- /src/lib/file_ext.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | use std::ffi::OsStr; 3 | 4 | /// Common types of file groups Telegram can send through a specific API. 5 | #[derive(Debug, Eq, PartialEq)] 6 | pub enum FileGroup { 7 | Animation, 8 | Video, 9 | Photo, 10 | Audio, 11 | /// The default file group 12 | Document, 13 | } 14 | 15 | // TODO: look at Telegram's docs to properly group these file extensions 16 | lazy_static! { 17 | /// A collection of extensions belonging to a `FileGroup`. 18 | pub static ref FILE_EXT_HASHMAP: HashMap<&'static OsStr, FileGroup> = { 19 | let mut ext = HashMap::new(); 20 | ext.insert(OsStr::new("gif"), FileGroup::Animation); 21 | 22 | ext.insert(OsStr::new("mp4"), FileGroup::Video); 23 | ext.insert(OsStr::new("mov"), FileGroup::Video); 24 | ext.insert(OsStr::new("avi"), FileGroup::Video); 25 | ext.insert(OsStr::new("flv"), FileGroup::Video); 26 | ext.insert(OsStr::new("mkv"), FileGroup::Video); 27 | ext.insert(OsStr::new("achd"), FileGroup::Video); 28 | 29 | ext.insert(OsStr::new("wav"), FileGroup::Audio); 30 | ext.insert(OsStr::new("mp3"), FileGroup::Audio); 31 | ext.insert(OsStr::new("m4a"), FileGroup::Audio); 32 | ext.insert(OsStr::new("wma"), FileGroup::Audio); 33 | ext.insert(OsStr::new("aac"), FileGroup::Audio); 34 | 35 | ext.insert(OsStr::new("jpg"), FileGroup::Photo); 36 | ext.insert(OsStr::new("png"), FileGroup::Photo); 37 | 38 | ext 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /src/cli.yml: -------------------------------------------------------------------------------- 1 | name: Tepe 2 | version: "0.0.5" 3 | author: Hermitter 4 | about: Send messages and files through a telegram bot. 5 | subcommands: 6 | - test: 7 | about: Verify that the bot is properly working. Message the bot on Telegram to receive a chat_id. 8 | args: 9 | - token: 10 | short: t 11 | long: token 12 | takes_value: true 13 | max_values: 1 14 | help: Sets the Telegram bot token. This ignores TEPE_TELEGRAM_BOT_TOKEN. 15 | - send: 16 | about: Send files and or a string to each chat_id passed. 17 | settings: AllowNegativeNumbers 18 | args: 19 | - files: 20 | required: false 21 | multiple: true 22 | - message: 23 | short: m 24 | long: message 25 | takes_value: true 26 | help: String to pass into a Telegram message. 27 | - token: 28 | short: t 29 | long: token 30 | takes_value: true 31 | max_values: 1 32 | help: Sets the Telegram bot token. This ignores the TEPE_TELEGRAM_BOT_TOKEN variable. 33 | - chat_ids: 34 | short: c 35 | long: chat 36 | multiple: true 37 | takes_value: true 38 | help: Specifies a new Telegram chat id. This will not ignore the TEPE_TELEGRAM_CHAT_ID variable. 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tepe 2 | 3 | [![Crate](https://img.shields.io/crates/v/tepe.svg)](https://crates.io/crates/tepe) 4 | 5 | Wondering if your build finished? Tepe is a CLI that lets you command a bot to send messages and files over Telegram. 6 | 7 | ![](assets/preview.gif) 8 | 9 | # Installation 10 | 11 | ## 1. Download Tepe 12 | > Installing from source/crates.io requires [Rust](http://rustup.rs/) on your computer. 13 | > Linux users will also need to have openssl dev files installed. 14 | > ``` 15 | > - Debian: sudo apt install libssl-dev 16 | > - Fedora: sudo dnf install openssl-devel 17 | > - Alpine: sudo apk add openssl-dev 18 | >``` 19 | 20 | Install Tepe from one of the following: 21 | 22 | - **[Crates.io](https://crates.io/crates/tepe)** 23 | 24 | 25 | ```bash 26 | cargo install tepe 27 | ``` 28 | 29 | - Source 30 | 31 | ```bash 32 | git clone https://github.com/Hermitter/tepe && cd tepe 33 | cargo install --path . 34 | ``` 35 | 36 | - [Prebuilt Releases](https://github.com/Hermitter/tepe/releases) 37 | ```bash 38 | # Currently built for x86_64 Linux, Windows, and macOS. 39 | # linux x86_64 setup example 40 | curl -L https://github.com/Hermitter/tepe/releases/latest/download/tepe-x86_64-unknown-linux-musl -o tepe 41 | chmod +x ./tepe 42 | ``` 43 | 44 | ## 2. Create Your Bot and Save the Token 45 | 46 | Talk to [@Botfather](https://t.me/botfather) and go through some dialog options until you've successfully created a bot. You should receive a token in the format of `123456789:blablabla` 47 | 48 | Export the token by exposing it as an environmental variable 49 | 50 | ```bash 51 | # Unix-like 52 | export TEPE_TELEGRAM_BOT_TOKEN=__Place_Bot_Token_Here__ 53 | ``` 54 | 55 | ```bash 56 | # Windows 57 | set TEPE_TELEGRAM_BOT_TOKEN=__Place_Bot_Token_Here__ 58 | ``` 59 | 60 | ## 3. Find the Chat ID with your Bot 61 | 62 | You can start talking to your bot by visiting (https://t.me/YOUR_BOT_NAME_HERE). 63 | 64 | Once inside the chat, run the following command. The bot will print the `chat_id` of any chatroom that messages it. 65 | 66 | ``` 67 | tepe test 68 | ``` 69 | 70 | Example output: 71 | 72 | ``` 73 | ********************************************************************* 74 | Your Telegram bot is now running! Try sending it a message on Telegram. 75 | On success, the chat_id is printed. 76 | 77 | Press Ctrl+c to exit. 78 | 79 | Successful reply from chat_id: 923567462 80 | ********************************************************************* 81 | ``` 82 | 83 | ## 4. Send Messages 84 | 85 | > TEPE_TELEGRAM_CHAT_ID can be set to avoid setting the same `chat_id` every time 86 | 87 | You're now ready to send messages! 88 | 89 | Example command: 90 | 91 | ```bash 92 | tepe send -c 923567462 ./shopping_list.txt ./some_photo.png -m "here are your things" 93 | ``` 94 | 95 | ```bash 96 | USAGE: 97 | tepe send [OPTIONS] [--] [files]... 98 | 99 | FLAGS: 100 | -h, --help Prints help information 101 | -V, --version Prints version information 102 | 103 | OPTIONS: 104 | -c, --chat ... Specifies a new Telegram chat id. This will not ignore the TEPE_TELEGRAM_CHAT_ID 105 | variable. 106 | -m, --message String to pass into a Telegram message. 107 | -t, --token Sets the Telegram bot token. This ignores the TEPE_TELEGRAM_BOT_TOKEN variable. 108 | 109 | ARGS: 110 | ... 111 | ``` 112 | -------------------------------------------------------------------------------- /src/lib/error.rs: -------------------------------------------------------------------------------- 1 | use std::{error::Error as StdError, fmt}; 2 | 3 | #[derive(Debug)] 4 | pub enum Error { 5 | /// Some unspecified error. 6 | Any(Box), 7 | TokioError { 8 | description: String, 9 | }, 10 | UnknownError, 11 | UnreadableMessage, 12 | FileNotFound { 13 | path: String, 14 | }, 15 | RequestError { 16 | description: String, 17 | }, 18 | ParsingError { 19 | description: String, 20 | }, 21 | MissingChatId, 22 | NoInput, 23 | } 24 | 25 | impl Error { 26 | /// Prints error to stderr and exits the program. 27 | pub fn exit(self) { 28 | eprintln!("{}", self); 29 | std::process::exit(1); 30 | } 31 | } 32 | 33 | impl<'a> fmt::Display for Error { 34 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 35 | match self { 36 | Error::RequestError { ref description } | Error::TokioError { ref description } => { 37 | write!(f, "\nMessage failed to send due to:\n\t{}", description) 38 | } 39 | Error::FileNotFound { ref path } => { 40 | write!(f, "\nCould not find file in path:\n\t{}", path) 41 | } 42 | Error::MissingChatId => { 43 | write!(f, "\nChat ID not found in flags or TEPE_TELEGRAM_CHAT_ID") 44 | } 45 | Error::NoInput => write!(f, "\nNo input was given"), 46 | Error::ParsingError { ref description } => { 47 | write!(f, "\nError from parsing:\n\t{}", description) 48 | } 49 | Error::UnreadableMessage => write!(f, "\nIssue parsing message"), 50 | _ => write!(f, "\nTODO: add error description"), 51 | } 52 | } 53 | } 54 | 55 | use teloxide::RequestError; 56 | impl From for Error { 57 | fn from(error: RequestError) -> Self { 58 | Error::RequestError { 59 | description: format!("{}", error), 60 | } 61 | } 62 | } 63 | 64 | use tokio::io::Error as TokioError; 65 | impl From for Error { 66 | fn from(error: TokioError) -> Self { 67 | Error::TokioError { 68 | description: format!("{}", error), 69 | } 70 | } 71 | } 72 | 73 | impl From for Error { 74 | fn from(error: std::num::ParseIntError) -> Self { 75 | Error::ParsingError { 76 | description: error.to_string(), 77 | } 78 | } 79 | } 80 | 81 | /// Trait to allow for an panic without Rust errors printing. 82 | /// This is mainly meant for Option and Result. 83 | pub trait CliExit { 84 | /// Prints message to stderr and exits the program. 85 | fn cli_expect(self, message: &str) -> T; 86 | } 87 | 88 | impl CliExit for Result { 89 | fn cli_expect(self, message: &str) -> T { 90 | match self { 91 | Ok(t) => t, 92 | Err(_e) => { 93 | eprintln!("{}", message); 94 | std::process::exit(1); 95 | } 96 | } 97 | } 98 | } 99 | 100 | impl CliExit for Option { 101 | fn cli_expect(self, message: &str) -> T { 102 | match self { 103 | Some(t) => t, 104 | None => { 105 | eprintln!("{}", message); 106 | std::process::exit(1); 107 | } 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /.github/workflows/binaries.yml: -------------------------------------------------------------------------------- 1 | name: Build/Upload Binaries 2 | on: 3 | push: 4 | tags: 5 | - v0.* 6 | 7 | jobs: 8 | default: 9 | name: ${{ matrix.platforms.target }} 10 | runs-on: ${{ matrix.platforms.os }} 11 | env: 12 | bin_path: "./target/${{ matrix.platforms.target }}/release/tepe${{ matrix.platforms.bin_ext }}" 13 | new_bin_path: "./tepe-${{ matrix.platforms.target }}${{ matrix.platforms.bin_ext }}" 14 | strategy: 15 | matrix: 16 | platforms: 17 | - { 18 | os: "windows-latest", 19 | target: "x86_64-pc-windows-msvc", 20 | cross: false, 21 | bin_ext: ".exe", 22 | } 23 | - { 24 | os: "macOS-latest", 25 | target: "x86_64-apple-darwin", 26 | cross: false, 27 | bin_ext: "", 28 | } 29 | steps: 30 | - uses: actions/checkout@v2 31 | - uses: actions-rs/toolchain@v1 32 | with: 33 | toolchain: stable 34 | target: ${{ matrix.platforms.target }} 35 | override: true 36 | 37 | - uses: actions-rs/cargo@v1 38 | with: 39 | use-cross: ${{ matrix.platforms.cross }} 40 | command: build 41 | args: --release --target=${{ matrix.platforms.target }} 42 | 43 | - name: Rename/Move Binary 44 | run: mv ${{ env.bin_path }} ${{ env.new_bin_path }} 45 | 46 | - name: Upload Binary 47 | uses: actions/upload-artifact@v2 48 | with: 49 | name: ${{ matrix.platforms.target }} 50 | path: ${{ env.new_bin_path }} 51 | if-no-files-found: error 52 | 53 | x86_64-unknown-linux-musl: 54 | # This build targets x86_64-unknown-linux-musl to create a static binary. 55 | # Learn more: https://doc.rust-lang.org/edition-guide/rust-2018/platform-and-target-support/musl-support-for-fully-static-binaries.html#musl-support-for-fully-static-binaries 56 | name: x86_64-unknown-linux-musl 57 | runs-on: ubuntu-latest 58 | container: { image: "rust:alpine3.13" } 59 | steps: 60 | - name: Add Alpine Packages 61 | run: apk add openssl-dev musl-dev perl make --no-cache 62 | 63 | - name: Download Repository 64 | uses: actions/checkout@v2 65 | 66 | - name: Build Binary 67 | run: cargo build --release --features vendored-openssl 68 | 69 | - name: Rename/Move Binary 70 | run: mv ./target/release/tepe ./tepe-x86_64-unknown-linux-musl 71 | 72 | - name: Reduce Binary Size 73 | run: strip -s ./tepe-x86_64-unknown-linux-musl 74 | 75 | - name: Upload Binary 76 | uses: actions/upload-artifact@v2 77 | with: 78 | name: x86_64-unknown-linux-musl 79 | path: ./tepe-x86_64-unknown-linux-musl 80 | if-no-files-found: error 81 | 82 | publish: 83 | name: Github Release 84 | needs: [default, x86_64-unknown-linux-musl] 85 | runs-on: ubuntu-latest 86 | steps: 87 | - name: Create GitHub Release 88 | id: create_release 89 | uses: actions/create-release@v1 90 | env: 91 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 92 | with: 93 | tag_name: ${{ github.ref }} 94 | release_name: Release ${{ github.ref }} 95 | draft: false 96 | prerelease: false 97 | 98 | # Each file is stored under: ./artifact_name/file_name 99 | - name: Download Binaries 100 | uses: actions/download-artifact@v2 101 | 102 | - name: Upload 103 | uses: softprops/action-gh-release@v1 104 | if: startsWith(github.ref, 'refs/tags/') 105 | with: 106 | files: ./*/* 107 | env: 108 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 109 | -------------------------------------------------------------------------------- /src/lib/send.rs: -------------------------------------------------------------------------------- 1 | use super::file_ext::{FileGroup, FILE_EXT_HASHMAP}; 2 | use super::Error; 3 | use super::TelegramBot; 4 | use std::ffi::{OsStr, OsString}; 5 | use std::path::PathBuf; 6 | use teloxide::types::InputFile; 7 | use teloxide::{prelude::*, requests::RequestWithFile}; 8 | 9 | impl TelegramBot { 10 | /// Send a document or text message 11 | pub async fn send( 12 | &self, 13 | message: Option<&str>, 14 | file_paths: &Vec, 15 | ) -> Result<(), Error> { 16 | if self.chat_ids.is_empty() { 17 | return Err(Error::MissingChatId); 18 | } 19 | 20 | if file_paths.is_empty() && message.is_none() { 21 | return Err(Error::NoInput); 22 | } 23 | 24 | let message = message.unwrap_or(""); 25 | 26 | for chat_id in &self.chat_ids { 27 | match file_paths.len() { 28 | // text message 29 | 0 => { 30 | if message.len() > 0 { 31 | self.send_text_message(message, *chat_id).await?; 32 | } 33 | } 34 | // single file and an optional text caption 35 | 1 => { 36 | self.create_file_request(*chat_id, PathBuf::from(&file_paths[0]), message)? 37 | .send() 38 | .await??; 39 | } 40 | // multiple files and an optional text message 41 | _ => { 42 | for file_path in file_paths { 43 | self.create_file_request(*chat_id, PathBuf::from(file_path), "")? 44 | .send() 45 | .await??; 46 | } 47 | 48 | if message.len() > 0 { 49 | self.send_text_message(message, *chat_id).await?; 50 | } 51 | } 52 | } 53 | } 54 | 55 | Ok(()) 56 | } 57 | 58 | /// Creates file specific Telegram requests for any file. Empty string captions are not sent to Telegram. 59 | fn create_file_request( 60 | &self, 61 | chat_id: i64, 62 | file: PathBuf, 63 | caption: &str, 64 | ) -> Result>, Error> { 65 | let ext_name = file.extension().unwrap_or(OsStr::new("")); 66 | 67 | if !file.is_file() { 68 | return Err(Error::FileNotFound { 69 | path: String::from(format!("{:?}", file)), 70 | }); 71 | }; 72 | 73 | // set file group to document, if nothing is found 74 | let file_group = FILE_EXT_HASHMAP 75 | .get(ext_name) 76 | .unwrap_or(&FileGroup::Document); 77 | 78 | let file = InputFile::file(file); 79 | 80 | match *file_group { 81 | FileGroup::Document => { 82 | return Ok(Box::new( 83 | self.bot.send_document(chat_id, file).caption(caption), 84 | )); 85 | } 86 | FileGroup::Photo => { 87 | return Ok(Box::new( 88 | self.bot.send_photo(chat_id, file).caption(caption), 89 | )); 90 | } 91 | FileGroup::Animation => { 92 | return Ok(Box::new( 93 | self.bot.send_animation(chat_id, file).caption(caption), 94 | )); 95 | } 96 | FileGroup::Video => { 97 | return Ok(Box::new( 98 | self.bot.send_video(chat_id, file).caption(caption), 99 | )); 100 | } 101 | FileGroup::Audio => { 102 | return Ok(Box::new( 103 | self.bot.send_audio(chat_id, file).caption(caption), 104 | )); 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/lib/mod.rs: -------------------------------------------------------------------------------- 1 | use clap::ArgMatches; 2 | use teloxide::{prelude::*, requests::Request, utils::markdown}; 3 | pub mod error; 4 | use error::{CliExit, Error}; 5 | pub mod file_ext; 6 | pub mod send; 7 | 8 | pub struct TelegramBot { 9 | /// Teleoxide representation of a Telegram bot 10 | pub bot: Bot, 11 | 12 | /// Default destination for messages 13 | pub chat_ids: Vec, 14 | } 15 | 16 | impl TelegramBot { 17 | /// Instantiate a Telegram bot from CLAP flags or default to environment variables. 18 | // TODO: change `cli_expect` to something that returns `crate::Error` 19 | pub fn from_clap(command: &ArgMatches) -> Result { 20 | let mut chat_ids = Vec::::new(); 21 | 22 | // get chat_ids from flags 23 | if let Some(args) = command.args.get("chat_ids") { 24 | for id in args.vals.iter() { 25 | chat_ids.push( 26 | id.clone() 27 | .into_string() 28 | .cli_expect(&format!("\nError parsing chat_id:\n\t{:?}", id)) 29 | .trim() 30 | .parse::() 31 | .cli_expect(&format!("\nError parsing chat_id:\n\t{:?}", id)), 32 | ); 33 | } 34 | } 35 | 36 | // get chat_id from environment variable 37 | if let Some(default_chat_id) = std::env::var("TEPE_TELEGRAM_CHAT_ID").ok() { 38 | chat_ids.push( 39 | default_chat_id 40 | .trim() 41 | .parse::() 42 | .cli_expect("\nError parsing TEPE_TELEGRAM_CHAT_ID"), 43 | ); 44 | } 45 | 46 | // token from flag or environment variable. 47 | let token = match command.args.get("token") { 48 | Some(arg) => arg.vals[0] 49 | .clone() 50 | .into_string() 51 | .cli_expect("\nError reading (--token, -t) argument"), 52 | None => std::env::var("TEPE_TELEGRAM_BOT_TOKEN") 53 | .cli_expect("\nTEPE_TELEGRAM_BOT_TOKEN has not been set"), 54 | }; 55 | 56 | Ok(TelegramBot { 57 | bot: Bot::builder().token(token).build(), 58 | chat_ids: chat_ids, 59 | }) 60 | } 61 | 62 | /// Print and send the Telegram `chat_id` to the first user response. 63 | pub async fn reply_chat_id(self) -> Result<(), Error> { 64 | println!("*********************************************************************\nYour Telegram bot is now running! Try sending it a message on Telegram.\nOn success, the chat_id is printed.\n\nPress Ctrl+c to exit."); 65 | 66 | Dispatcher::new(self.bot) 67 | .messages_handler(|rx: DispatcherHandlerRx| { 68 | rx.for_each(|message| async move { 69 | let response = format!( 70 | "{} `{}`", 71 | markdown::escape("This bot is good to go! This chat_id is"), 72 | &message.chat_id().to_string() 73 | ); 74 | 75 | let request = message 76 | .answer(response) 77 | .parse_mode(teloxide::types::ParseMode::MarkdownV2) 78 | .send() 79 | .await; 80 | 81 | // exit and print a success or error message 82 | match request { 83 | Ok(message) => { 84 | println!("{}", format!("\nSuccessful reply from chat_id: {}\n*********************************************************************", &message.chat_id())); 85 | } 86 | Err(error) => {Error::from(error).exit()} 87 | } 88 | }) 89 | }) 90 | .dispatch() 91 | .await; 92 | 93 | Ok(()) 94 | } 95 | 96 | /// Send a text message to the `chat_id`. 97 | pub async fn send_text_message(&self, text: &str, chat_id: i64) -> Result<(), Error> { 98 | self.bot.send_message(chat_id, text).send().await?; 99 | Ok(()) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "ansi_term" 5 | version = "0.11.0" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 8 | dependencies = [ 9 | "winapi 0.3.8", 10 | ] 11 | 12 | [[package]] 13 | name = "async-trait" 14 | version = "0.1.48" 15 | source = "registry+https://github.com/rust-lang/crates.io-index" 16 | checksum = "36ea56748e10732c49404c153638a15ec3d6211ec5ff35d9bb20e13b93576adf" 17 | dependencies = [ 18 | "proc-macro2", 19 | "quote", 20 | "syn", 21 | ] 22 | 23 | [[package]] 24 | name = "atty" 25 | version = "0.2.14" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 28 | dependencies = [ 29 | "hermit-abi", 30 | "libc", 31 | "winapi 0.3.8", 32 | ] 33 | 34 | [[package]] 35 | name = "autocfg" 36 | version = "1.0.0" 37 | source = "registry+https://github.com/rust-lang/crates.io-index" 38 | checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" 39 | 40 | [[package]] 41 | name = "base64" 42 | version = "0.13.0" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 45 | 46 | [[package]] 47 | name = "bitflags" 48 | version = "1.2.1" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 51 | 52 | [[package]] 53 | name = "bumpalo" 54 | version = "3.3.0" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "5356f1d23ee24a1f785a56d1d1a5f0fd5b0f6a0c0fb2412ce11da71649ab78f6" 57 | 58 | [[package]] 59 | name = "bytes" 60 | version = "0.5.6" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" 63 | 64 | [[package]] 65 | name = "cc" 66 | version = "1.0.54" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" 69 | 70 | [[package]] 71 | name = "cfg-if" 72 | version = "0.1.10" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 75 | 76 | [[package]] 77 | name = "cfg-if" 78 | version = "1.0.0" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 81 | 82 | [[package]] 83 | name = "clap" 84 | version = "2.33.1" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" 87 | dependencies = [ 88 | "ansi_term", 89 | "atty", 90 | "bitflags", 91 | "strsim", 92 | "textwrap", 93 | "unicode-width", 94 | "vec_map", 95 | "yaml-rust", 96 | ] 97 | 98 | [[package]] 99 | name = "core-foundation" 100 | version = "0.7.0" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" 103 | dependencies = [ 104 | "core-foundation-sys", 105 | "libc", 106 | ] 107 | 108 | [[package]] 109 | name = "core-foundation-sys" 110 | version = "0.7.0" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" 113 | 114 | [[package]] 115 | name = "derive_more" 116 | version = "0.99.11" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" 119 | dependencies = [ 120 | "proc-macro2", 121 | "quote", 122 | "syn", 123 | ] 124 | 125 | [[package]] 126 | name = "encoding_rs" 127 | version = "0.8.23" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" 130 | dependencies = [ 131 | "cfg-if 0.1.10", 132 | ] 133 | 134 | [[package]] 135 | name = "fnv" 136 | version = "1.0.7" 137 | source = "registry+https://github.com/rust-lang/crates.io-index" 138 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 139 | 140 | [[package]] 141 | name = "foreign-types" 142 | version = "0.3.2" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 145 | dependencies = [ 146 | "foreign-types-shared", 147 | ] 148 | 149 | [[package]] 150 | name = "foreign-types-shared" 151 | version = "0.1.1" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 154 | 155 | [[package]] 156 | name = "form_urlencoded" 157 | version = "1.0.1" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 160 | dependencies = [ 161 | "matches", 162 | "percent-encoding", 163 | ] 164 | 165 | [[package]] 166 | name = "fuchsia-zircon" 167 | version = "0.3.3" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 170 | dependencies = [ 171 | "bitflags", 172 | "fuchsia-zircon-sys", 173 | ] 174 | 175 | [[package]] 176 | name = "fuchsia-zircon-sys" 177 | version = "0.3.3" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 180 | 181 | [[package]] 182 | name = "futures" 183 | version = "0.3.5" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613" 186 | dependencies = [ 187 | "futures-channel", 188 | "futures-core", 189 | "futures-executor", 190 | "futures-io", 191 | "futures-sink", 192 | "futures-task", 193 | "futures-util", 194 | ] 195 | 196 | [[package]] 197 | name = "futures-channel" 198 | version = "0.3.5" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" 201 | dependencies = [ 202 | "futures-core", 203 | "futures-sink", 204 | ] 205 | 206 | [[package]] 207 | name = "futures-core" 208 | version = "0.3.5" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" 211 | 212 | [[package]] 213 | name = "futures-executor" 214 | version = "0.3.5" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314" 217 | dependencies = [ 218 | "futures-core", 219 | "futures-task", 220 | "futures-util", 221 | ] 222 | 223 | [[package]] 224 | name = "futures-io" 225 | version = "0.3.5" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" 228 | 229 | [[package]] 230 | name = "futures-macro" 231 | version = "0.3.5" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" 234 | dependencies = [ 235 | "proc-macro-hack", 236 | "proc-macro2", 237 | "quote", 238 | "syn", 239 | ] 240 | 241 | [[package]] 242 | name = "futures-sink" 243 | version = "0.3.5" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" 246 | 247 | [[package]] 248 | name = "futures-task" 249 | version = "0.3.5" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" 252 | dependencies = [ 253 | "once_cell", 254 | ] 255 | 256 | [[package]] 257 | name = "futures-util" 258 | version = "0.3.5" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" 261 | dependencies = [ 262 | "futures-channel", 263 | "futures-core", 264 | "futures-io", 265 | "futures-macro", 266 | "futures-sink", 267 | "futures-task", 268 | "memchr", 269 | "pin-project", 270 | "pin-utils", 271 | "proc-macro-hack", 272 | "proc-macro-nested", 273 | "slab", 274 | ] 275 | 276 | [[package]] 277 | name = "getrandom" 278 | version = "0.1.14" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" 281 | dependencies = [ 282 | "cfg-if 0.1.10", 283 | "libc", 284 | "wasi", 285 | ] 286 | 287 | [[package]] 288 | name = "h2" 289 | version = "0.2.5" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff" 292 | dependencies = [ 293 | "bytes", 294 | "fnv", 295 | "futures-core", 296 | "futures-sink", 297 | "futures-util", 298 | "http", 299 | "indexmap", 300 | "log", 301 | "slab", 302 | "tokio", 303 | "tokio-util", 304 | ] 305 | 306 | [[package]] 307 | name = "hermit-abi" 308 | version = "0.1.13" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | checksum = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71" 311 | dependencies = [ 312 | "libc", 313 | ] 314 | 315 | [[package]] 316 | name = "http" 317 | version = "0.2.1" 318 | source = "registry+https://github.com/rust-lang/crates.io-index" 319 | checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" 320 | dependencies = [ 321 | "bytes", 322 | "fnv", 323 | "itoa", 324 | ] 325 | 326 | [[package]] 327 | name = "http-body" 328 | version = "0.3.1" 329 | source = "registry+https://github.com/rust-lang/crates.io-index" 330 | checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" 331 | dependencies = [ 332 | "bytes", 333 | "http", 334 | ] 335 | 336 | [[package]] 337 | name = "httparse" 338 | version = "1.3.4" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" 341 | 342 | [[package]] 343 | name = "hyper" 344 | version = "0.13.5" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | checksum = "96816e1d921eca64d208a85aab4f7798455a8e34229ee5a88c935bdee1b78b14" 347 | dependencies = [ 348 | "bytes", 349 | "futures-channel", 350 | "futures-core", 351 | "futures-util", 352 | "h2", 353 | "http", 354 | "http-body", 355 | "httparse", 356 | "itoa", 357 | "log", 358 | "net2", 359 | "pin-project", 360 | "time", 361 | "tokio", 362 | "tower-service", 363 | "want", 364 | ] 365 | 366 | [[package]] 367 | name = "hyper-tls" 368 | version = "0.4.1" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" 371 | dependencies = [ 372 | "bytes", 373 | "hyper", 374 | "native-tls", 375 | "tokio", 376 | "tokio-tls", 377 | ] 378 | 379 | [[package]] 380 | name = "idna" 381 | version = "0.2.0" 382 | source = "registry+https://github.com/rust-lang/crates.io-index" 383 | checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" 384 | dependencies = [ 385 | "matches", 386 | "unicode-bidi", 387 | "unicode-normalization", 388 | ] 389 | 390 | [[package]] 391 | name = "indexmap" 392 | version = "1.3.2" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" 395 | dependencies = [ 396 | "autocfg", 397 | ] 398 | 399 | [[package]] 400 | name = "iovec" 401 | version = "0.1.4" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 404 | dependencies = [ 405 | "libc", 406 | ] 407 | 408 | [[package]] 409 | name = "ipnet" 410 | version = "2.3.0" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" 413 | 414 | [[package]] 415 | name = "itoa" 416 | version = "0.4.5" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" 419 | 420 | [[package]] 421 | name = "js-sys" 422 | version = "0.3.48" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "dc9f84f9b115ce7843d60706df1422a916680bfdfcbdb0447c5614ff9d7e4d78" 425 | dependencies = [ 426 | "wasm-bindgen", 427 | ] 428 | 429 | [[package]] 430 | name = "kernel32-sys" 431 | version = "0.2.2" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 434 | dependencies = [ 435 | "winapi 0.2.8", 436 | "winapi-build", 437 | ] 438 | 439 | [[package]] 440 | name = "lazy_static" 441 | version = "1.4.0" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 444 | 445 | [[package]] 446 | name = "libc" 447 | version = "0.2.71" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" 450 | 451 | [[package]] 452 | name = "lockfree" 453 | version = "0.5.1" 454 | source = "registry+https://github.com/rust-lang/crates.io-index" 455 | checksum = "74ee94b5ad113c7cb98c5a040f783d0952ee4fe100993881d1673c2cb002dd23" 456 | dependencies = [ 457 | "owned-alloc", 458 | ] 459 | 460 | [[package]] 461 | name = "log" 462 | version = "0.4.8" 463 | source = "registry+https://github.com/rust-lang/crates.io-index" 464 | checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 465 | dependencies = [ 466 | "cfg-if 0.1.10", 467 | ] 468 | 469 | [[package]] 470 | name = "matches" 471 | version = "0.1.8" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 474 | 475 | [[package]] 476 | name = "memchr" 477 | version = "2.3.3" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" 480 | 481 | [[package]] 482 | name = "mime" 483 | version = "0.3.16" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 486 | 487 | [[package]] 488 | name = "mime_guess" 489 | version = "2.0.3" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" 492 | dependencies = [ 493 | "mime", 494 | "unicase", 495 | ] 496 | 497 | [[package]] 498 | name = "mio" 499 | version = "0.6.22" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" 502 | dependencies = [ 503 | "cfg-if 0.1.10", 504 | "fuchsia-zircon", 505 | "fuchsia-zircon-sys", 506 | "iovec", 507 | "kernel32-sys", 508 | "libc", 509 | "log", 510 | "miow", 511 | "net2", 512 | "slab", 513 | "winapi 0.2.8", 514 | ] 515 | 516 | [[package]] 517 | name = "miow" 518 | version = "0.2.1" 519 | source = "registry+https://github.com/rust-lang/crates.io-index" 520 | checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 521 | dependencies = [ 522 | "kernel32-sys", 523 | "net2", 524 | "winapi 0.2.8", 525 | "ws2_32-sys", 526 | ] 527 | 528 | [[package]] 529 | name = "native-tls" 530 | version = "0.2.4" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" 533 | dependencies = [ 534 | "lazy_static", 535 | "libc", 536 | "log", 537 | "openssl", 538 | "openssl-probe", 539 | "openssl-sys", 540 | "schannel", 541 | "security-framework", 542 | "security-framework-sys", 543 | "tempfile", 544 | ] 545 | 546 | [[package]] 547 | name = "net2" 548 | version = "0.2.34" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" 551 | dependencies = [ 552 | "cfg-if 0.1.10", 553 | "libc", 554 | "winapi 0.3.8", 555 | ] 556 | 557 | [[package]] 558 | name = "num_cpus" 559 | version = "1.13.0" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 562 | dependencies = [ 563 | "hermit-abi", 564 | "libc", 565 | ] 566 | 567 | [[package]] 568 | name = "once_cell" 569 | version = "1.4.0" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" 572 | 573 | [[package]] 574 | name = "openssl" 575 | version = "0.10.29" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "cee6d85f4cb4c4f59a6a85d5b68a233d280c82e29e822913b9c8b129fbf20bdd" 578 | dependencies = [ 579 | "bitflags", 580 | "cfg-if 0.1.10", 581 | "foreign-types", 582 | "lazy_static", 583 | "libc", 584 | "openssl-sys", 585 | ] 586 | 587 | [[package]] 588 | name = "openssl-probe" 589 | version = "0.1.2" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 592 | 593 | [[package]] 594 | name = "openssl-src" 595 | version = "111.14.0+1.1.1j" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "055b569b5bd7e5462a1700f595c7c7d487691d73b5ce064176af7f9f0cbb80a9" 598 | dependencies = [ 599 | "cc", 600 | ] 601 | 602 | [[package]] 603 | name = "openssl-sys" 604 | version = "0.9.57" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "7410fef80af8ac071d4f63755c0ab89ac3df0fd1ea91f1d1f37cf5cec4395990" 607 | dependencies = [ 608 | "autocfg", 609 | "cc", 610 | "libc", 611 | "openssl-src", 612 | "pkg-config", 613 | "vcpkg", 614 | ] 615 | 616 | [[package]] 617 | name = "owned-alloc" 618 | version = "0.2.0" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "30fceb411f9a12ff9222c5f824026be368ff15dc2f13468d850c7d3f502205d6" 621 | 622 | [[package]] 623 | name = "percent-encoding" 624 | version = "2.1.0" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 627 | 628 | [[package]] 629 | name = "pin-project" 630 | version = "0.4.27" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" 633 | dependencies = [ 634 | "pin-project-internal", 635 | ] 636 | 637 | [[package]] 638 | name = "pin-project-internal" 639 | version = "0.4.27" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" 642 | dependencies = [ 643 | "proc-macro2", 644 | "quote", 645 | "syn", 646 | ] 647 | 648 | [[package]] 649 | name = "pin-project-lite" 650 | version = "0.1.5" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f" 653 | 654 | [[package]] 655 | name = "pin-project-lite" 656 | version = "0.2.6" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" 659 | 660 | [[package]] 661 | name = "pin-utils" 662 | version = "0.1.0" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 665 | 666 | [[package]] 667 | name = "pkg-config" 668 | version = "0.3.17" 669 | source = "registry+https://github.com/rust-lang/crates.io-index" 670 | checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" 671 | 672 | [[package]] 673 | name = "ppv-lite86" 674 | version = "0.2.8" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" 677 | 678 | [[package]] 679 | name = "proc-macro-hack" 680 | version = "0.5.16" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" 683 | 684 | [[package]] 685 | name = "proc-macro-nested" 686 | version = "0.1.4" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" 689 | 690 | [[package]] 691 | name = "proc-macro2" 692 | version = "1.0.24" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" 695 | dependencies = [ 696 | "unicode-xid", 697 | ] 698 | 699 | [[package]] 700 | name = "quote" 701 | version = "1.0.9" 702 | source = "registry+https://github.com/rust-lang/crates.io-index" 703 | checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" 704 | dependencies = [ 705 | "proc-macro2", 706 | ] 707 | 708 | [[package]] 709 | name = "rand" 710 | version = "0.7.3" 711 | source = "registry+https://github.com/rust-lang/crates.io-index" 712 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 713 | dependencies = [ 714 | "getrandom", 715 | "libc", 716 | "rand_chacha", 717 | "rand_core", 718 | "rand_hc", 719 | ] 720 | 721 | [[package]] 722 | name = "rand_chacha" 723 | version = "0.2.2" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 726 | dependencies = [ 727 | "ppv-lite86", 728 | "rand_core", 729 | ] 730 | 731 | [[package]] 732 | name = "rand_core" 733 | version = "0.5.1" 734 | source = "registry+https://github.com/rust-lang/crates.io-index" 735 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 736 | dependencies = [ 737 | "getrandom", 738 | ] 739 | 740 | [[package]] 741 | name = "rand_hc" 742 | version = "0.2.0" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 745 | dependencies = [ 746 | "rand_core", 747 | ] 748 | 749 | [[package]] 750 | name = "redox_syscall" 751 | version = "0.1.56" 752 | source = "registry+https://github.com/rust-lang/crates.io-index" 753 | checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" 754 | 755 | [[package]] 756 | name = "remove_dir_all" 757 | version = "0.5.2" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" 760 | dependencies = [ 761 | "winapi 0.3.8", 762 | ] 763 | 764 | [[package]] 765 | name = "reqwest" 766 | version = "0.10.10" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" 769 | dependencies = [ 770 | "base64", 771 | "bytes", 772 | "encoding_rs", 773 | "futures-core", 774 | "futures-util", 775 | "http", 776 | "http-body", 777 | "hyper", 778 | "hyper-tls", 779 | "ipnet", 780 | "js-sys", 781 | "lazy_static", 782 | "log", 783 | "mime", 784 | "mime_guess", 785 | "native-tls", 786 | "percent-encoding", 787 | "pin-project-lite 0.2.6", 788 | "serde", 789 | "serde_json", 790 | "serde_urlencoded", 791 | "tokio", 792 | "tokio-tls", 793 | "url", 794 | "wasm-bindgen", 795 | "wasm-bindgen-futures", 796 | "web-sys", 797 | "winreg", 798 | ] 799 | 800 | [[package]] 801 | name = "ryu" 802 | version = "1.0.4" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" 805 | 806 | [[package]] 807 | name = "schannel" 808 | version = "0.1.19" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 811 | dependencies = [ 812 | "lazy_static", 813 | "winapi 0.3.8", 814 | ] 815 | 816 | [[package]] 817 | name = "security-framework" 818 | version = "0.4.4" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" 821 | dependencies = [ 822 | "bitflags", 823 | "core-foundation", 824 | "core-foundation-sys", 825 | "libc", 826 | "security-framework-sys", 827 | ] 828 | 829 | [[package]] 830 | name = "security-framework-sys" 831 | version = "0.4.3" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" 834 | dependencies = [ 835 | "core-foundation-sys", 836 | "libc", 837 | ] 838 | 839 | [[package]] 840 | name = "serde" 841 | version = "1.0.124" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "bd761ff957cb2a45fbb9ab3da6512de9de55872866160b23c25f1a841e99d29f" 844 | dependencies = [ 845 | "serde_derive", 846 | ] 847 | 848 | [[package]] 849 | name = "serde_derive" 850 | version = "1.0.124" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | checksum = "1800f7693e94e186f5e25a28291ae1570da908aff7d97a095dec1e56ff99069b" 853 | dependencies = [ 854 | "proc-macro2", 855 | "quote", 856 | "syn", 857 | ] 858 | 859 | [[package]] 860 | name = "serde_json" 861 | version = "1.0.64" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" 864 | dependencies = [ 865 | "itoa", 866 | "ryu", 867 | "serde", 868 | ] 869 | 870 | [[package]] 871 | name = "serde_urlencoded" 872 | version = "0.7.0" 873 | source = "registry+https://github.com/rust-lang/crates.io-index" 874 | checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" 875 | dependencies = [ 876 | "form_urlencoded", 877 | "itoa", 878 | "ryu", 879 | "serde", 880 | ] 881 | 882 | [[package]] 883 | name = "serde_with_macros" 884 | version = "1.1.0" 885 | source = "registry+https://github.com/rust-lang/crates.io-index" 886 | checksum = "4070d2c9b9d258465ad1d82aabb985b84cd9a3afa94da25ece5a9938ba5f1606" 887 | dependencies = [ 888 | "proc-macro2", 889 | "quote", 890 | "syn", 891 | ] 892 | 893 | [[package]] 894 | name = "slab" 895 | version = "0.4.2" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 898 | 899 | [[package]] 900 | name = "smallvec" 901 | version = "1.4.0" 902 | source = "registry+https://github.com/rust-lang/crates.io-index" 903 | checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" 904 | 905 | [[package]] 906 | name = "strsim" 907 | version = "0.8.0" 908 | source = "registry+https://github.com/rust-lang/crates.io-index" 909 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 910 | 911 | [[package]] 912 | name = "syn" 913 | version = "1.0.63" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | checksum = "8fd9bc7ccc2688b3344c2f48b9b546648b25ce0b20fc717ee7fa7981a8ca9717" 916 | dependencies = [ 917 | "proc-macro2", 918 | "quote", 919 | "unicode-xid", 920 | ] 921 | 922 | [[package]] 923 | name = "teloxide" 924 | version = "0.3.4" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "a265c0b217a2adfeb630562b5ec058dbd32f277d032e8d630caee2c7575cea76" 927 | dependencies = [ 928 | "async-trait", 929 | "bytes", 930 | "derive_more", 931 | "futures", 932 | "lockfree", 933 | "log", 934 | "mime", 935 | "pin-project", 936 | "reqwest", 937 | "serde", 938 | "serde_json", 939 | "serde_with_macros", 940 | "teloxide-macros", 941 | "thiserror", 942 | "tokio", 943 | "tokio-util", 944 | ] 945 | 946 | [[package]] 947 | name = "teloxide-macros" 948 | version = "0.3.2" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "13d8854ad575520d8b37f4a7fdfcd381f48849557f0907b1a7d8163dbd8e952f" 951 | dependencies = [ 952 | "proc-macro2", 953 | "quote", 954 | "syn", 955 | ] 956 | 957 | [[package]] 958 | name = "tempfile" 959 | version = "3.1.0" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" 962 | dependencies = [ 963 | "cfg-if 0.1.10", 964 | "libc", 965 | "rand", 966 | "redox_syscall", 967 | "remove_dir_all", 968 | "winapi 0.3.8", 969 | ] 970 | 971 | [[package]] 972 | name = "tepe" 973 | version = "0.0.5" 974 | dependencies = [ 975 | "clap", 976 | "lazy_static", 977 | "openssl", 978 | "teloxide", 979 | "tokio", 980 | ] 981 | 982 | [[package]] 983 | name = "textwrap" 984 | version = "0.11.0" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 987 | dependencies = [ 988 | "unicode-width", 989 | ] 990 | 991 | [[package]] 992 | name = "thiserror" 993 | version = "1.0.24" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" 996 | dependencies = [ 997 | "thiserror-impl", 998 | ] 999 | 1000 | [[package]] 1001 | name = "thiserror-impl" 1002 | version = "1.0.24" 1003 | source = "registry+https://github.com/rust-lang/crates.io-index" 1004 | checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" 1005 | dependencies = [ 1006 | "proc-macro2", 1007 | "quote", 1008 | "syn", 1009 | ] 1010 | 1011 | [[package]] 1012 | name = "time" 1013 | version = "0.1.43" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" 1016 | dependencies = [ 1017 | "libc", 1018 | "winapi 0.3.8", 1019 | ] 1020 | 1021 | [[package]] 1022 | name = "tokio" 1023 | version = "0.2.21" 1024 | source = "registry+https://github.com/rust-lang/crates.io-index" 1025 | checksum = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58" 1026 | dependencies = [ 1027 | "bytes", 1028 | "fnv", 1029 | "futures-core", 1030 | "iovec", 1031 | "lazy_static", 1032 | "memchr", 1033 | "mio", 1034 | "num_cpus", 1035 | "pin-project-lite 0.1.5", 1036 | "slab", 1037 | "tokio-macros", 1038 | ] 1039 | 1040 | [[package]] 1041 | name = "tokio-macros" 1042 | version = "0.2.6" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" 1045 | dependencies = [ 1046 | "proc-macro2", 1047 | "quote", 1048 | "syn", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "tokio-tls" 1053 | version = "0.3.1" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" 1056 | dependencies = [ 1057 | "native-tls", 1058 | "tokio", 1059 | ] 1060 | 1061 | [[package]] 1062 | name = "tokio-util" 1063 | version = "0.3.1" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" 1066 | dependencies = [ 1067 | "bytes", 1068 | "futures-core", 1069 | "futures-sink", 1070 | "log", 1071 | "pin-project-lite 0.1.5", 1072 | "tokio", 1073 | ] 1074 | 1075 | [[package]] 1076 | name = "tower-service" 1077 | version = "0.3.0" 1078 | source = "registry+https://github.com/rust-lang/crates.io-index" 1079 | checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" 1080 | 1081 | [[package]] 1082 | name = "try-lock" 1083 | version = "0.2.2" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" 1086 | 1087 | [[package]] 1088 | name = "unicase" 1089 | version = "2.6.0" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1092 | dependencies = [ 1093 | "version_check", 1094 | ] 1095 | 1096 | [[package]] 1097 | name = "unicode-bidi" 1098 | version = "0.3.4" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1101 | dependencies = [ 1102 | "matches", 1103 | ] 1104 | 1105 | [[package]] 1106 | name = "unicode-normalization" 1107 | version = "0.1.12" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" 1110 | dependencies = [ 1111 | "smallvec", 1112 | ] 1113 | 1114 | [[package]] 1115 | name = "unicode-width" 1116 | version = "0.1.7" 1117 | source = "registry+https://github.com/rust-lang/crates.io-index" 1118 | checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" 1119 | 1120 | [[package]] 1121 | name = "unicode-xid" 1122 | version = "0.2.0" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 1125 | 1126 | [[package]] 1127 | name = "url" 1128 | version = "2.2.1" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" 1131 | dependencies = [ 1132 | "form_urlencoded", 1133 | "idna", 1134 | "matches", 1135 | "percent-encoding", 1136 | ] 1137 | 1138 | [[package]] 1139 | name = "vcpkg" 1140 | version = "0.2.8" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" 1143 | 1144 | [[package]] 1145 | name = "vec_map" 1146 | version = "0.8.2" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1149 | 1150 | [[package]] 1151 | name = "version_check" 1152 | version = "0.9.2" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" 1155 | 1156 | [[package]] 1157 | name = "want" 1158 | version = "0.3.0" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1161 | dependencies = [ 1162 | "log", 1163 | "try-lock", 1164 | ] 1165 | 1166 | [[package]] 1167 | name = "wasi" 1168 | version = "0.9.0+wasi-snapshot-preview1" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1171 | 1172 | [[package]] 1173 | name = "wasm-bindgen" 1174 | version = "0.2.71" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "7ee1280240b7c461d6a0071313e08f34a60b0365f14260362e5a2b17d1d31aa7" 1177 | dependencies = [ 1178 | "cfg-if 1.0.0", 1179 | "serde", 1180 | "serde_json", 1181 | "wasm-bindgen-macro", 1182 | ] 1183 | 1184 | [[package]] 1185 | name = "wasm-bindgen-backend" 1186 | version = "0.2.71" 1187 | source = "registry+https://github.com/rust-lang/crates.io-index" 1188 | checksum = "5b7d8b6942b8bb3a9b0e73fc79b98095a27de6fa247615e59d096754a3bc2aa8" 1189 | dependencies = [ 1190 | "bumpalo", 1191 | "lazy_static", 1192 | "log", 1193 | "proc-macro2", 1194 | "quote", 1195 | "syn", 1196 | "wasm-bindgen-shared", 1197 | ] 1198 | 1199 | [[package]] 1200 | name = "wasm-bindgen-futures" 1201 | version = "0.4.21" 1202 | source = "registry+https://github.com/rust-lang/crates.io-index" 1203 | checksum = "8e67a5806118af01f0d9045915676b22aaebecf4178ae7021bc171dab0b897ab" 1204 | dependencies = [ 1205 | "cfg-if 1.0.0", 1206 | "js-sys", 1207 | "wasm-bindgen", 1208 | "web-sys", 1209 | ] 1210 | 1211 | [[package]] 1212 | name = "wasm-bindgen-macro" 1213 | version = "0.2.71" 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" 1215 | checksum = "e5ac38da8ef716661f0f36c0d8320b89028efe10c7c0afde65baffb496ce0d3b" 1216 | dependencies = [ 1217 | "quote", 1218 | "wasm-bindgen-macro-support", 1219 | ] 1220 | 1221 | [[package]] 1222 | name = "wasm-bindgen-macro-support" 1223 | version = "0.2.71" 1224 | source = "registry+https://github.com/rust-lang/crates.io-index" 1225 | checksum = "cc053ec74d454df287b9374ee8abb36ffd5acb95ba87da3ba5b7d3fe20eb401e" 1226 | dependencies = [ 1227 | "proc-macro2", 1228 | "quote", 1229 | "syn", 1230 | "wasm-bindgen-backend", 1231 | "wasm-bindgen-shared", 1232 | ] 1233 | 1234 | [[package]] 1235 | name = "wasm-bindgen-shared" 1236 | version = "0.2.71" 1237 | source = "registry+https://github.com/rust-lang/crates.io-index" 1238 | checksum = "7d6f8ec44822dd71f5f221a5847fb34acd9060535c1211b70a05844c0f6383b1" 1239 | 1240 | [[package]] 1241 | name = "web-sys" 1242 | version = "0.3.40" 1243 | source = "registry+https://github.com/rust-lang/crates.io-index" 1244 | checksum = "7b72fe77fd39e4bd3eaa4412fd299a0be6b3dfe9d2597e2f1c20beb968f41d17" 1245 | dependencies = [ 1246 | "js-sys", 1247 | "wasm-bindgen", 1248 | ] 1249 | 1250 | [[package]] 1251 | name = "winapi" 1252 | version = "0.2.8" 1253 | source = "registry+https://github.com/rust-lang/crates.io-index" 1254 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1255 | 1256 | [[package]] 1257 | name = "winapi" 1258 | version = "0.3.8" 1259 | source = "registry+https://github.com/rust-lang/crates.io-index" 1260 | checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" 1261 | dependencies = [ 1262 | "winapi-i686-pc-windows-gnu", 1263 | "winapi-x86_64-pc-windows-gnu", 1264 | ] 1265 | 1266 | [[package]] 1267 | name = "winapi-build" 1268 | version = "0.1.1" 1269 | source = "registry+https://github.com/rust-lang/crates.io-index" 1270 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1271 | 1272 | [[package]] 1273 | name = "winapi-i686-pc-windows-gnu" 1274 | version = "0.4.0" 1275 | source = "registry+https://github.com/rust-lang/crates.io-index" 1276 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1277 | 1278 | [[package]] 1279 | name = "winapi-x86_64-pc-windows-gnu" 1280 | version = "0.4.0" 1281 | source = "registry+https://github.com/rust-lang/crates.io-index" 1282 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1283 | 1284 | [[package]] 1285 | name = "winreg" 1286 | version = "0.7.0" 1287 | source = "registry+https://github.com/rust-lang/crates.io-index" 1288 | checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" 1289 | dependencies = [ 1290 | "winapi 0.3.8", 1291 | ] 1292 | 1293 | [[package]] 1294 | name = "ws2_32-sys" 1295 | version = "0.2.1" 1296 | source = "registry+https://github.com/rust-lang/crates.io-index" 1297 | checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1298 | dependencies = [ 1299 | "winapi 0.2.8", 1300 | "winapi-build", 1301 | ] 1302 | 1303 | [[package]] 1304 | name = "yaml-rust" 1305 | version = "0.3.5" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | checksum = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" 1308 | --------------------------------------------------------------------------------