mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-23 22:00:10 +08:00
Fix unappropriated arg requirement
This commit is contained in:
parent
3ecae98810
commit
aa09fb1a9e
@ -37,13 +37,13 @@ interface Member : QQ, Contact {
|
||||
|
||||
@ExperimentalTime
|
||||
suspend inline fun Member.mute(duration: Duration) {
|
||||
require(duration.inDays > 30) { "duration must be at most 1 month" }
|
||||
require(duration.inDays <= 30) { "duration must be at most 1 month" }
|
||||
require(duration.inSeconds > 0) { "duration must be greater than 0 second" }
|
||||
this.mute(duration.inSeconds.toInt())
|
||||
}
|
||||
|
||||
suspend inline fun Member.mute(duration: TimeSpan) {
|
||||
require(duration.days > 30) { "duration must be at most 1 month" }
|
||||
require(duration.days <= 30) { "duration must be at most 1 month" }
|
||||
require(duration.microseconds > 0) { "duration must be greater than 0 second" }
|
||||
this.mute(duration.seconds.toInt())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user