Add shortcut

This commit is contained in:
Him188 2020-02-13 16:09:10 +08:00
parent a3945924a4
commit 8f03d44df1

View File

@ -98,4 +98,6 @@ suspend inline fun Member.mute(duration: Duration): Boolean {
require(duration.inDays <= 30) { "duration must be at most 1 month" }
require(duration.inSeconds > 0) { "duration must be greater than 0 second" }
return this.mute(duration.inSeconds.toInt())
}
}
suspend inline fun Member.mute(durationSeconds: Long) = this.mute(durationSeconds.toInt())