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
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user