Skip to content

Commit

Permalink
fix(src): change /add film separator
Browse files Browse the repository at this point in the history
from '||' to ',,,'
  • Loading branch information
andros21 committed Sep 26, 2023
1 parent c43af42 commit 7d5c1ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ async fn got_command(bot: Bot, dialogue: MyDialogue, msg: Message, cmd: Command)
match cmd {
Command::Add(film_str) => {
if !film_str.is_empty() {
let items: Vec<&str> = film_str.split("||").collect();
let items: Vec<&str> = film_str.split(",,,").collect();
if items.len() != 3 {
error!("Invalid items number: {:?}", items);
bot.send_message(
msg.chat.id,
"⚠️ Invalid items number: title||year||url".to_string(),
"⚠️ Invalid items number: title,,,year,,,url".to_string(),
)
.await?;
} else {
Expand Down Expand Up @@ -248,7 +248,7 @@ async fn got_command(bot: Bot, dialogue: MyDialogue, msg: Message, cmd: Command)
} else {
bot.send_message(
msg.chat.id,
"ℹ️ Usage: /add <title>||<year>||<url>".to_string(),
"ℹ️ Usage: /add <title>,,,<year>,,,<url>".to_string(),
)
.await?;
};
Expand Down

0 comments on commit 7d5c1ab

Please sign in to comment.