Skip to content

Commit

Permalink
fix(network): clear previous webhook setting
Browse files Browse the repository at this point in the history
  • Loading branch information
itsusinn committed Aug 4, 2021
1 parent 6079cd7 commit e18f69b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Cargo.lock
/target/
**/*.rs.bk
/.idea
config.yaml
config.yaml.old
config.yml
config.yml.old
*.mp3
*.jpg
1 change: 1 addition & 0 deletions src/despatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub async fn cmd_or_msg_repl<N,Cmd, CH, MH, FutC, FutM, ErrC, ErrM>(
let listener = webhook(&bot).await;
cmd_or_msg_repl_with_listener(bot, bot_name, cmd_handler, msg_handler, listener).await;
} else {
bot.delete_webhook().await.expect("Failed to delete previous webhook");
let listener = update_listeners::polling_default(bot.clone()).await;
cmd_or_msg_repl_with_listener(bot, bot_name, cmd_handler, msg_handler, listener).await;
};
Expand Down

0 comments on commit e18f69b

Please sign in to comment.