Overview
Comment: | simplify a little |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
093ae6c75bcab21ea91c23a6516d12f6 |
User & Date: | arcade on 2022-02-15 14:56:35.512 |
Other Links: | manifest | tags |
Context
2022-03-12
| ||
13:25 | bump, update config check-in: 28da2e2a00 user: arcade tags: trunk | |
2022-02-15
| ||
14:56 | simplify a little check-in: 093ae6c75b user: arcade tags: trunk | |
2022-02-13
| ||
19:57 | rework time, rework autofetch, clippy lint check-in: 26339860ce user: arcade tags: trunk | |
Changes
Modified src/command.rs
from [aefdc11026]
to [b3f83f0747].
︙ | ︙ | |||
84 85 86 87 88 89 90 | let _url_rex = ReplaceCommand::new(thing).context("Regexp parsing error:")?; Some(thing) } } }, None => None, }; | < | | | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | let _url_rex = ReplaceCommand::new(thing).context("Regexp parsing error:")?; Some(thing) } } }, None => None, }; let channel_id = i64::from(core.tg.send(telegram_bot::GetChat::new(telegram_bot::ChatRef::ChannelUsername(channel.to_string()))).await?.id()); let chan_adm = core.tg.send(telegram_bot::GetChatAdministrators::new(telegram_bot::ChatRef::ChannelUsername(channel.to_string()))).await .context("Sorry, I have no access to that chat.")?; let (mut me, mut user) = (false, false); for admin in chan_adm { if admin.user.id == core.my.id { me = true; }; if admin.user.id == sender { |
︙ | ︙ |
Modified src/core.rs
from [a6c540ecfc]
to [55d4d9b615].
︙ | ︙ | |||
62 63 64 65 66 67 68 | pub fn stream(&self) -> telegram_bot::UpdatesStream { self.tg.stream() } pub async fn send<'a, S>(&self, msg: S, target: Option<telegram_bot::UserId>, mode: Option<telegram_bot::types::ParseMode>) -> Result<()> where S: Into<Cow<'a, str>> { | < < | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | pub fn stream(&self) -> telegram_bot::UpdatesStream { self.tg.stream() } pub async fn send<'a, S>(&self, msg: S, target: Option<telegram_bot::UserId>, mode: Option<telegram_bot::types::ParseMode>) -> Result<()> where S: Into<Cow<'a, str>> { let mode = mode.unwrap_or(telegram_bot::types::ParseMode::Html); let target = target.unwrap_or(self.owner_chat); self.tg.send(telegram_bot::SendMessage::new(target, msg).parse_mode(mode)).await?; Ok(()) } pub async fn check<S>(&self, id: &i32, owner: S, real: bool) -> Result<Cow<'_, str>> |
︙ | ︙ |