-
Notifications
You must be signed in to change notification settings - Fork 20
Improve development experience #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
…d get_channel and get_forum_channel - Fixed c-help-redirect stuff - add option to get_channel and get_forum_channel to optionally also check for channel type
jeremy-rifkin
left a comment
There was a problem hiding this 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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
| const channel_context = | ||
| message.channel.id === this.wheatley.channels.memes | ||
| ? " in #memes" | ||
| : message.channel.id === this.wheatley.channels.cursed_code | ||
| ? " in #cursed-code" | ||
| : ""; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
|



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 (?))