Skip to content

Commit

Permalink
Fix issue with multi-getter
Browse files Browse the repository at this point in the history
  • Loading branch information
SunburntRock89 committed Jun 1, 2023
1 parent 47c094f commit 6a35714
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/internals/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ class DTelClient extends Client<true> {

if (possibilities.number) {
if (possibilities.number?.guildID) {
possibilities.guild = await this.getGuild(possibilities.number.guildID);
possibilities.guild = await this.getGuild(possibilities.number.guildID).catch(() => undefined);
} else {
const tempChan = await this.getChannel(possibilities.number.channelID).catch(() => undefined);
if (tempChan) {
if (tempChan?.isDMBased()) {
possibilities.user = (tempChan as DMChannel).recipient;
} else {
possibilities.guild = (tempChan as TextChannel | null | undefined)?.guild;
}
}
}
Expand Down

0 comments on commit 6a35714

Please sign in to comment.