Commit aa09fb1a authored by Him188's avatar Him188

Fix unappropriated arg requirement

parent 3ecae988
......@@ -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())
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment