createVersion: v1.3
目次
create()
このコンテンツはまだ日本語訳がありません。
This function is used to create a user in the database.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | string | ✅ | The User ID |
| guildId | string | ✅ | The Guild ID |
Returns
Section titled “Returns”- Promise<
Boolean>
Throws
Section titled “Throws”new Error()- if invalid parameters are provided.
[JS] Example
Section titled “[JS] Example”const {create} = require('simply-xp');
const userid = "326815959358898189";const guildid = "867999056172052551";
create(userid, guildid) .then(console.log) // Returns the user object .catch((err) => console.log(err)); // Returns the error