U2D5BY4KBQLM5NZLWGOTNVYDECYSBHYVGHTWSXSOWYW2NTIMEMTQC
BKETWSNXBOFZUKUQZ6WGMYR34ACPIGCQ7BZWGRR4VVDDMF57VWLAC
HSHQP542PXUJQVPUFX2YOSI6N4DYZ75VTBOIVJMYJXFSTKKIBDMAC
F7EHBV5ZMTWLG625Z3NEVDONESXOUZSBZFTDN2GADKLSQJZP72DAC
HU54Y66265W2VOTVERPHEFFKM3FDNZHL5FDTWBE4OX5YIELFNRLAC
6ZURHACLQ6F3QGSEGRENRUOZWBTRBOAXKHC372AGXXQ7FA7RX6QAC
YREDNL3G26AXAUNMTGBRZUMJM3MBZ2TGGJJ5JLIRWBSOTPSEWFHQC
HR7EMS5WWDJASCN25DIFBKTRAESBEPGQDZIGP7DAO7EWXDW2HQSQC
Y5DIB6C3UMYHI7UVDP442GJCLRCIUHZRHJDQVP3IQSUNJFXG4ZOAC
Z6JH7HGOELY6KHQX4DOHLU7Q7NAVO4YK7ZU3FRAABFMJEMESCKRQC
JSUQLISL2P54R4AJLE4TDRZOXMSGK3SQJEQTOUD7BZZSC3JE35KQC
WR2LC73HN6Z56NSL37UUGUGEUL5SF7MN344DHT4X5NPN4YZ4RQMQC
5YD5TE7BVUUMNIT2WQPFPLZ75Z4GK74B2NPCZO33U2JWCEOSN4HAC
RMDIMY3MH33WIWBBF53RHT26PALCFY6QUNNS735XGFTWPMZ2FTFAC
7X3AZRA7PHV3TYMSR6YSE3XZTZDYRF7UMH7UELYMTXRBYCVE6R4QC
OFSMNOASLNIZ56VMIIHRU6X6BX6IXJ2ACMSLGIBSKUTW2DJIBHVAC
let mut rng = data.get::<crate::Random>().unwrap().lock().await;
loop {
let mut rng = data.get::<crate::Random>().unwrap().lock().await;
let page = fetch_cat_page(&mut *rng).await.map_err(|e| {
anyhow!(
"Catto express: was not able to deliver you cat: {}\n{}",
e,
"https://i.redd.it/4q32jedhkgi31.jpg" // crying catto
)
})?;
let url = fetch_url_in_cat_page(page).ok_or(anyhow!(
"Catto express: your catto got lost in the page :pensive:"
))?;
let answer = msg
.channel_id
.send_files(&ctx, vec![url.as_str()], |m| m.content(&msg.author))
.await?;
let plus_emoji = "➕".parse::<ReactionType>().unwrap();
let url = if args.len() != 0 {
fetch_dog_breed_url(args.raw().collect::<Vec<&str>>()).await
} else {
fetch_random_dog_url().await
};
loop {
let url = if args.len() != 0 {
fetch_dog_breed_url(args.raw().collect::<Vec<&str>>()).await
} else {
fetch_random_dog_url().await
};
let answer = msg
.channel_id
.send_files(&ctx, vec![url?.as_str()], |m| m.content(&msg.author))
.await?;
let plus_emoji = "➕".parse::<ReactionType>().unwrap();
answer.react(ctx, plus_emoji.clone()).await?;
let more = answer
.await_reaction(ctx)
.timeout(Duration::from_secs(60 * 10))
.filter(move |reaction| reaction.emoji == plus_emoji)
.await;
let url = fetch_random_fox_url().await?;
loop {
let url = fetch_random_fox_url().await?;
let answer = msg
.channel_id
.send_files(&ctx, vec![url.as_str()], |m| m.content(&msg.author))
.await?;
let plus_emoji = "➕".parse::<ReactionType>().unwrap();
answer.react(ctx, plus_emoji.clone()).await?;
let more = answer
.await_reaction(ctx)
.timeout(Duration::from_secs(60 * 10))
.filter(move |reaction| reaction.emoji == plus_emoji)
.await;
let mut rng = data.get::<crate::Random>().unwrap().lock().await;
loop {
let mut rng = data.get::<crate::Random>().unwrap().lock().await;
let page = fetch_spood_page(&mut *rng).await.map_err(|e| {
anyhow!(
"Spoddo express: was not able to deliver you spood: {}\n{}",
e,
"https://cdn.drawception.com/drawings/gB8gGBpkSW.png" // crying spoddo
)
})?;
let url = fetch_url_in_spood_page(page, &mut *rng).ok_or(anyhow!(
"Spoddo express: your spood got lost in the page :pensive:"
))?;
let answer = msg
.channel_id
.send_files(&ctx, vec![url.as_str()], |m| m.content(&msg.author))
.await?;
let plus_emoji = "➕".parse::<ReactionType>().unwrap();
let url = fetch_url_in_spood_page(page, &mut *rng).ok_or(anyhow!(
"Spoddo express: your spood got lost in the page :pensive:"
))?;
let more = answer
.await_reaction(ctx)
.timeout(Duration::from_secs(60 * 10))
.filter(move |reaction| reaction.emoji == plus_emoji)
.await;
// We will fetch your bot's owners and id
let (owners, bot_id) = match http.get_current_application_info().await {
Ok(info) => {
let mut owners = HashSet::new();
if let Some(team) = info.team {
owners.insert(team.owner_user_id);
} else {
owners.insert(info.owner.id);
}
match http.get_current_user().await {
Ok(bot_id) => (owners, bot_id.id),
Err(why) => panic!("Could not access the bot id: {:?}", why),
}
}
Err(why) => panic!("Could not access application info: {:?}", why),
};