mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-21 13:26:07 +08:00
Add shortcut
This commit is contained in:
parent
a3945924a4
commit
8f03d44df1
@ -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())
|
Loading…
Reference in New Issue
Block a user