wrapper stuff

This commit is contained in:
Erik 2022-04-22 21:43:04 +03:00
parent 4440aff26c
commit 0a353a4809
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 12 additions and 0 deletions

View File

@ -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 };

View File

@ -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!');