Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 2021 terms and make bot more polite #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tgbot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn handle_update((tgbot, update): (RcBot, Update), tgsvc: &Arc<TgSvc>) -> Result
if let (Ok(id), Ok(wl)) = (tgbot.inner.id.read(), tgsvc.whitelist.read()) {
if *id == Some(new_user.id) && !wl.group_ok(chat_id) {
tokio::spawn(nullify_future!("leaving group",
tgbot.message(chat_id, format!("You or this group is not on the whitelist. Seek help. ID: {}", chat_id)).send()
tgbot.message(chat_id, format!("You or this group is not on the allowlist. Please seek help. ID: {}", chat_id)).send()
.and_then(move |(tgbot, _)| tgbot.leave_chat(chat_id).send())));
}
}
Expand All @@ -131,7 +131,7 @@ fn handle_eval(tgsvc: &Arc<TgSvc>, tgbot: RcBot, msg: Message, lang: &Arc<Langua
if group && !wl.group_ok(chat_id)
|| !group && !wl.priv_ok(chat_id) {
tokio::spawn(nullify_future!("sending message",
tgbot.message(chat_id, format!("You or this group is not on the whitelist. Seek help. ID: {}", chat_id)).send()));
tgbot.message(chat_id, format!("You or this group is not on the allowlist. Please seek help. ID: {}", chat_id)).send()));
return Ok(()).into_future();
}
} else {
Expand Down