Update schemas and resolve some warnings
This commit is contained in:
@ -593,18 +593,11 @@ pub(crate) async fn create_reminder(
|
||||
}
|
||||
|
||||
fn check_channel_matches_guild(ctx: &Context, channel_id: ChannelId, guild_id: GuildId) -> bool {
|
||||
// validate channel
|
||||
let channel = channel_id.to_channel_cached(&ctx.cache);
|
||||
let channel_exists = channel.is_some();
|
||||
return match ctx.cache.guild(guild_id) {
|
||||
Some(guild) => guild.channels.get(&channel_id).is_some(),
|
||||
|
||||
if !channel_exists {
|
||||
return false;
|
||||
}
|
||||
|
||||
let channel_matches_guild =
|
||||
channel.map_or(false, |c| c.guild(&ctx.cache).map_or(false, |g| g.id == guild_id));
|
||||
|
||||
channel_matches_guild
|
||||
None => false,
|
||||
};
|
||||
}
|
||||
|
||||
async fn create_database_channel(
|
||||
|
Reference in New Issue
Block a user