mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-08-26 15:08:03 -04:00
feat: timeout functionality (#173)
Signed-off-by: İspik <ispik@ispik.dev>
This commit is contained in:
@@ -260,4 +260,19 @@ export class ServerMember {
|
||||
async kick(): Promise<void> {
|
||||
this.server?.kickUser(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Timeout this member until the given date
|
||||
* @param date ISO8601 timestamp to time out until
|
||||
*/
|
||||
async setTimeout(date: string): Promise<void> {
|
||||
await this.edit({ timeout: date });
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove this member's timeout
|
||||
*/
|
||||
async removeTimeout(): Promise<void> {
|
||||
await this.edit({ remove: ["Timeout"] });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user