Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
attempt to fix a check
Browse files Browse the repository at this point in the history
  • Loading branch information
RealEthanPlayzDev committed Oct 11, 2023
1 parent ca5824f commit 63a53c5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/Moderation/Ban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const Command: MeteoriumCommand = {
const PublicModLogChannel = await interaction.guild.channels
.fetch(GuildSchema.PublicModLogChannelId)
.catch(() => null);
if (PublicModLogChannel != null && PublicModLogChannel.isTextBased())
if (PublicModLogChannel && PublicModLogChannel.isTextBased())
await PublicModLogChannel.send({ embeds: [LogEmbed] });

return await interaction.reply({
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Moderation/Kick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const Command: MeteoriumCommand = {
const PublicModLogChannel = await interaction.guild.channels
.fetch(GuildSchema.PublicModLogChannelId)
.catch(() => null);
if (PublicModLogChannel != null && PublicModLogChannel.isTextBased())
if (PublicModLogChannel && PublicModLogChannel.isTextBased())
await PublicModLogChannel.send({ embeds: [LogEmbed] });

return await interaction.reply({
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Moderation/Mute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const Command: MeteoriumCommand = {
const PublicModLogChannel = await interaction.guild.channels
.fetch(GuildSchema.PublicModLogChannelId)
.catch(() => null);
if (PublicModLogChannel != null && PublicModLogChannel.isTextBased())
if (PublicModLogChannel && PublicModLogChannel.isTextBased())
await PublicModLogChannel.send({ embeds: [LogEmbed] });

return await interaction.reply({
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Moderation/Warn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const Command: MeteoriumCommand = {
const PublicModLogChannel = await interaction.guild.channels
.fetch(GuildSchema.PublicModLogChannelId)
.catch(() => null);
if (PublicModLogChannel != null && PublicModLogChannel.isTextBased())
if (PublicModLogChannel && PublicModLogChannel.isTextBased())
await PublicModLogChannel.send({ embeds: [LogEmbed] });

return await interaction.reply({
Expand Down

0 comments on commit 63a53c5

Please sign in to comment.