Skip to content

Commit

Permalink
Don't rely on the presence of the guild ID
Browse files Browse the repository at this point in the history
  • Loading branch information
SunburntRock89 committed May 27, 2023
1 parent f0cc048 commit a37fc1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/support/ninfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export default class NInfo extends Command {
// If this is a guild channel
// We know we can see the channel at this point, so we can definitely see both the guild and the owner
// If there is no guild, since we can see the channel we can see the user;
if (number.guildID) {
const guild = await this.client.getGuild(number.guildID);
if (!channel.isDMBased()) {
const guild = await channel.guild.fetch();
ownerStrikeCount = await this.db.strikes.count({
where: {
offender: guild.ownerId,
Expand Down

0 comments on commit a37fc1a

Please sign in to comment.