paginate /queue
All checks were successful
tests / fmt (push) Successful in 2m15s
tests / fmt (pull_request) Successful in 1m35s
tests / test (push) Successful in 2m39s
tests / pre-commit (push) Successful in 2m37s
tests / clippy (push) Successful in 2m44s
tests / build (push) Successful in 3m4s
tests / clippy (pull_request) Successful in 2m49s
tests / build (pull_request) Successful in 2m53s
tests / test (pull_request) Successful in 2m51s
tests / pre-commit (pull_request) Successful in 1m34s

This commit is contained in:
2024-06-13 00:49:11 +02:00
parent b4a1efb22a
commit a0ac87959b
14 changed files with 1031 additions and 535 deletions

View File

@@ -9,14 +9,14 @@ pub(crate) async fn delete(
state: State,
) -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
let admin = env::var("ADMIN")?.parse::<u64>()?;
if msg.author.id != Id::from(NonZeroU64::new(admin).unwrap()) {
if msg.author.id != Id::from(NonZeroU64::new(admin).expect("Could not get author id")) {
return Ok(());
}
let n = msg
.content
.split(' ')
.last()
.unwrap()
.unwrap_or("1")
.parse::<u16>()
.unwrap_or(1);
if n > 100 {