fix(ThreadChannel): better property handling (#6172)

This commit is contained in:
ckohen
2021-07-27 17:29:06 -07:00
committed by GitHub
parent 30a58dc801
commit 9679b90872
8 changed files with 64 additions and 33 deletions

View File

@@ -121,7 +121,9 @@ class CommandInteraction extends Interaction {
if (member) result.member = this.guild?.members._add({ user, ...member }) ?? member;
const channel = resolved.channels?.[option.value];
if (channel) result.channel = this.client.channels._add(channel, this.guild) ?? channel;
if (channel) {
result.channel = this.client.channels._add(channel, this.guild, { fromInteraction: true }) ?? channel;
}
const role = resolved.roles?.[option.value];
if (role) result.role = this.guild?.roles._add(role) ?? role;