Skip to content

Commit

Permalink
Fix example 5's retrieval of owners when the bot belongs to a team (#960
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vicky5124 authored Sep 13, 2020
1 parent 78dd862 commit 5c0c045
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/e05_command_framework/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ async fn main() {
let (owners, bot_id) = match http.get_current_application_info().await {
Ok(info) => {
let mut owners = HashSet::new();
owners.insert(info.owner.id);
if let Some(team) = info.team {
owners.insert(team.owner_user_id);
} else {
owners.insert(info.owner.id);
}

(owners, info.id)
},
Expand Down

0 comments on commit 5c0c045

Please sign in to comment.