Refactor macros

This commit is contained in:
jude
2024-02-06 20:08:59 +00:00
parent e4e9af2bb4
commit def43bfa78
14 changed files with 98 additions and 333 deletions

View File

@ -31,9 +31,7 @@ pub async fn check_guild_subscription(
cache_http: impl CacheHttp,
guild_id: impl Into<GuildId>,
) -> bool {
if let Some(guild) = cache_http.cache().unwrap().guild(guild_id) {
let owner = guild.owner_id;
if let Some(owner) = cache_http.cache().unwrap().guild(guild_id).map(|g| g.owner_id) {
check_subscription(&cache_http, owner).await
} else {
false