From 0a353a4809aab005742fbe3deebabdbcc7e167f5 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 22 Apr 2022 21:43:04 +0300 Subject: [PATCH] wrapper stuff --- src/structure/client/wrappers/InvokerWrapper.js | 8 ++++++++ src/structure/client/wrappers/MessageWrapper.js | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/structure/client/wrappers/InvokerWrapper.js b/src/structure/client/wrappers/InvokerWrapper.js index a85d478..92f9695 100644 --- a/src/structure/client/wrappers/InvokerWrapper.js +++ b/src/structure/client/wrappers/InvokerWrapper.js @@ -19,6 +19,10 @@ class InvokerWrapper { } + get id() { + return this.target.id; + } + get user() { return this.target.author; } @@ -68,6 +72,10 @@ class InvokerWrapper { return this.client.getUserWrapper(this.user.id); } + deferReply(options) { + return this.target.deferReply(options); + } + async reply(options = {}) { if (typeof options === 'string') options = { content: options }; diff --git a/src/structure/client/wrappers/MessageWrapper.js b/src/structure/client/wrappers/MessageWrapper.js index 8fd5532..0b3f60f 100644 --- a/src/structure/client/wrappers/MessageWrapper.js +++ b/src/structure/client/wrappers/MessageWrapper.js @@ -40,6 +40,10 @@ class MessageWrapper { return Boolean(this._reply); } + deferReply() { + return undefined; + } + async reply(options) { if (this._reply) throw new Error('Message has already been replied to!');