diff options
Diffstat (limited to 'src/dist/classes/User.js')
-rw-r--r-- | src/dist/classes/User.js | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/dist/classes/User.js b/src/dist/classes/User.js index c99b29a..b9c9b87 100644 --- a/src/dist/classes/User.js +++ b/src/dist/classes/User.js @@ -68,12 +68,6 @@ class User { } } /** - * Create a {@link DM} with this user - */ - createDM() { - return new DM_1.DM(this.uuid ?? null, this.number, this.client); - } - /** * Create a new {@link User} from a phone number * @param number - The phone number to use * @param client @@ -82,6 +76,12 @@ class User { return new User(number, UserDataType_1.UserDataType.Number, client); } /** + * Create a {@link DM} with this user + */ + createDM() { + return new DM_1.DM(this.uuid ?? null, this.number, this.client); + } + /** * Block or unblock this user * @param blocked - Whether the user should be blocked or not */ @@ -112,8 +112,7 @@ class User { } else { await CLIDispatcher_1.CLIDispatcher.dispatch("trust", { - trustAllKnownKeys: true, - recipient: [this.number] + trustAllKnownKeys: true, recipient: [this.number] }, this.client.process); } } @@ -123,8 +122,7 @@ class User { */ async addToContacts(name) { await CLIDispatcher_1.CLIDispatcher.dispatch("updateContact", { - name: name, - recipient: [this.number] + name: name, recipient: [this.number] }, this.client.process); await CLIDispatcher_1.CLIDispatcher.dispatch("sendContacts", {}, this.client.process); } @@ -144,8 +142,7 @@ class User { */ async setDisappearingMessagesTime(time) { await CLIDispatcher_1.CLIDispatcher.dispatch("updateContact", { - expiration: time ?? 0, - recipient: [this.number] + expiration: time ?? 0, recipient: [this.number] }, this.client.process); await CLIDispatcher_1.CLIDispatcher.dispatch("sendContacts", {}, this.client.process); } |