mirror of
https://github.com/Noratrieb/widetom.git
synced 2026-01-14 17:05:03 +01:00
Update
This commit is contained in:
parent
490c94ca50
commit
893d109fda
2 changed files with 612 additions and 345 deletions
935
Cargo.lock
generated
935
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
22
src/main.rs
22
src/main.rs
|
|
@ -36,18 +36,16 @@ async fn main() {
|
||||||
|
|
||||||
let http = Http::new_with_token(&token);
|
let http = Http::new_with_token(&token);
|
||||||
|
|
||||||
let (owners, bot_id) = match http.get_current_application_info().await {
|
http.get_current_application_info()
|
||||||
Ok(_) => {
|
.await
|
||||||
let mut owners = HashSet::new();
|
.expect("could not access application info");
|
||||||
owners.insert(UserId(414755070161453076)); //nils
|
let bot_id = http
|
||||||
owners.insert(UserId(265849018662387712)); //yuki
|
.get_current_user()
|
||||||
match http.get_current_user().await {
|
.await
|
||||||
Ok(bot_id) => (owners, bot_id.id),
|
.expect("could not access the bot ID")
|
||||||
Err(why) => panic!("Could not access the bot id: {:?}", why),
|
.id;
|
||||||
}
|
|
||||||
}
|
let owners = HashSet::from([UserId(414755070161453076), UserId(265849018662387712)]);
|
||||||
Err(why) => panic!("Could not access application info: {:?}", why),
|
|
||||||
};
|
|
||||||
|
|
||||||
let framework = StandardFramework::new()
|
let framework = StandardFramework::new()
|
||||||
.configure(|c| {
|
.configure(|c| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue