let ban = ctx
.framework
.twilight_client
.create_ban(guild_id, punished_user.id)
.delete_message_seconds(self.purge.value() as u32);
debug!("Purging {:#?} messages!", self.purge.value() as u32);
match reason {
None => ban.await?,
Some(ref reason) => ban.reason(reason).await?
};
I have checked the value and its a valid number (number is enforced by enum, not raw user input), but it appears that while the ban works, no messages are deleted. Also tried hardcoding the value as a test and that too does not play ball.
Looking at the logs it seems the request is also working fine, as I can see the API request to delete messages:
2023-08-27T21:30:06.340161Z DEBUG luro::interactions::moderator::ban: Purging 604800 messages!
2023-08-27T21:30:06.340219Z DEBUG twilight_http::client: url="https://discord.com/api/v10/guilds/234815470954348545/bans/938331375759687700?delete_message_seconds=604800"
Bit lost what is up?