Skip to content

Commit

Permalink
Update Teloxide
Browse files Browse the repository at this point in the history
  • Loading branch information
dracarys18 committed Apr 24, 2022
1 parent 0864655 commit 763b0d6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 153 deletions.
167 changes: 18 additions & 149 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
egg-mode = "0.16.0"
dotenv = "0.15.0"
teloxide = "0.7.2"
teloxide = "0.8"
thiserror = "1.0.30"
futures = "0.3"
tokio = {version = "1.17.0", features = ["macros","rt-multi-thread","time"]}
6 changes: 3 additions & 3 deletions src/stream/stream_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use crate::error::TweetResult;
use crate::utils::{get_tweet_url, tweet_has_media, tweet_has_url};
use egg_mode::stream::{filter, StreamMessage};
use futures::TryStreamExt;
use teloxide::prelude2::*;
use teloxide::types::ParseMode;
use teloxide::prelude::*;
use teloxide::types::{ChatId, ParseMode};
use teloxide::utils::html::escape;

pub async fn stream_tweets(config: &Config, to_follow: &[u64]) -> TweetResult<()> {
Expand Down Expand Up @@ -35,7 +35,7 @@ pub async fn stream_tweets(config: &Config, to_follow: &[u64]) -> TweetResult<()
if (config.keywords.is_empty() || config.keywords.eq(&vec![""]))
|| contains_keyword
{
bot.send_message(config.chat_id, message)
bot.send_message(ChatId(config.chat_id), message)
.parse_mode(ParseMode::Html)
.disable_web_page_preview(preview)
.await
Expand Down

0 comments on commit 763b0d6

Please sign in to comment.