feat(core/database, bindings/node): suspend user

This commit is contained in:
Paul Makles
2024-08-31 17:10:47 +01:00
parent ae1d5d07e3
commit 01368960f3
16 changed files with 856 additions and 25 deletions

View File

@@ -18,6 +18,12 @@ export declare interface Err {
location: string;
}
/**
* Initialises background tasks and logging, must be called before anything else!
* Can be called multiple times!
*/
export declare function init();
/**
* Gets a new handle to the Revolt database
* @returns {Database} Handle
@@ -64,3 +70,15 @@ export declare function proc_channels_create_dm(
userA: string,
userB: string
): Promise<Channel & { error: Err }>;
/**
* Suspend a user
* @param {string} user User
* @param {number} duration Duration (in days), set to 0 for indefinite
* @param {string} reason Pipe-separated list of reasons (e.g. reason1|reason2|reason3)
*/
export declare function proc_users_suspend(
user: OpaqueUser,
duration: number,
reason: string
): Promise<{ error: Err }>;