Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.js.example
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const config = {
// Otherwise it will return false.
check: (message) => {
const serverOwner = message.author ?? message.user;
return message.channel.type === "GUILD_TEXT" ? (message.guild.ownerId === serverOwner.id ? true : false) : false;
return (message.channel.type === "GUILD_TEXT" || message.channel.isThread()) ? (message.guild.ownerId === serverOwner.id ? true : false) : false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work in news channels and is frankly over-engineered. Try this:

Suggested change
return (message.channel.type === "GUILD_TEXT" || message.channel.isThread()) ? (message.guild.ownerId === serverOwner.id ? true : false) : false;
return message.guild?.ownerId === serverOwner.id;

}
},

Expand Down