Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(utils): default parameters should be placed after non-default ones (
#55) Fixes #53 --- <details open="true"><summary>Generated summary (powered by <a href="https://app.graphite.dev">Graphite</a>)</summary> > ## TL;DR > This pull request swaps the order of the `guildId` and `roleId` parameters in the `modifyUserRole` function in `Utils.ts`. > > ## What changed > In the `modifyUserRole` function, the `guildId` parameter was previously set to default to `SUPPORT_SERVER_ID` if no value was provided. This parameter was placed before the `roleId` parameter. This order has been swapped in this pull request, so now `roleId` comes before `guildId`. > > ```diff > - guildId: Snowflake = SUPPORT_SERVER_ID, > roleId: Snowflake, > + guildId: Snowflake = SUPPORT_SERVER_ID, > ``` > > ## How to test > To test this change, call the `modifyUserRole` function with various combinations of parameters. Ensure that the function behaves as expected when `guildId` is not provided, and that it correctly uses the provided `roleId`. > > ## Why make this change > This change improves the readability and usability of the `modifyUserRole` function. By placing the `roleId` parameter before the `guildId` parameter, it is clearer that `roleId` is a required parameter, while `guildId` is optional and will default to `SUPPORT_SERVER_ID` if not provided. This makes the function easier to use and understand. </details>
- Loading branch information