Skip to content

Conversation

@xLuxy
Copy link

@xLuxy xLuxy commented Jan 28, 2026

This PR improves the development experience by checking for channel and role names while not being in production mode and resolves them automatically.

(+ more minor improvements to be done (?))

Copy link
Contributor

@Rinzii Rinzii left a comment

Choose a reason for hiding this comment

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

Review as requested by luxy.

Copy link
Member

@jeremy-rifkin jeremy-rifkin left a comment

Choose a reason for hiding this comment

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

Hi, thanks for taking the time to contribute to the bot! Some initial comments below

override async setup(commands: CommandSetBuilder) {
this.skill_roles = unwrap(this.wheatley.components.get("SkillRoles")) as SkillRoles;

this.wheatley.validateChannelsAndRoles("channel", categories_map);
Copy link
Member

Choose a reason for hiding this comment

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

Something like this shouldn't be called by a random component

Copy link
Author

Choose a reason for hiding this comment

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

how would you do this instead? adding it into bot-utilities?

Comment on lines -344 to -349
const channel_context =
message.channel.id === this.wheatley.channels.memes
? " in #memes"
: message.channel.id === this.wheatley.channels.cursed_code
? " in #cursed-code"
: "";
Copy link
Member

Choose a reason for hiding this comment

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

A PR like this is much easier to review if it doesn't change functionality

Copy link
Author

@xLuxy xLuxy Jan 28, 2026

Choose a reason for hiding this comment

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

this variable was never used so i removed it to clean up "Issues" from Sonar - it doesn't change existing functionality.

return (
thread.parentId != null &&
[this.wheatley.channels.code_review, this.wheatley.channels.showcase].includes(thread.parentId)
[this.wheatley.channels.code_review, this.wheatley.channels.showcase].some(ch => ch.id === thread.parentId)
Copy link
Member

Choose a reason for hiding this comment

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

Minor: Better variable name please

Copy link
Author

Choose a reason for hiding this comment

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

what would you prefer? channel_info?

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants