Skip to content
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

[WIP] Localize all commands and refactor most commands #445

Merged
merged 44 commits into from
Sep 12, 2023

Conversation

swiizyy
Copy link
Member

@swiizyy swiizyy commented Aug 10, 2023

No description provided.

@swiizyy swiizyy added translations dependencies Dependencie related command This is related to a Command labels Aug 11, 2023
@swiizyy swiizyy changed the title Localize all commands and refactor most commands [WIP] Localize all commands and refactor most commands Aug 11, 2023
Tools = '<:tools_birthdayy:1102222421651623936>',
}

export const enum BrandingColors {
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer having Constant Variable names in UPPERCASE.
What do you think?

@nikolaischunk nikolaischunk self-requested a review August 15, 2023 10:51
});
}
}

export const BirthdayApplicationCommandMentions = {
Copy link
Member

Choose a reason for hiding this comment

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

exporting command mentions, is this the correct place to do it and what is the usecase?

PostStatsSuccess = 'postStatsSuccess',
}

export const enum PermissionLevels {
Copy link
Member

Choose a reason for hiding this comment

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

What are your plans for this enum?

Copy link
Member

Choose a reason for hiding this comment

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

Shouldnt the functions be seperated from the types?
I mean this file is in a folder called types

}
}

export function floatPromise(promise: Awaitable<unknown>) {
Copy link
Member

@nikolaischunk nikolaischunk Aug 15, 2023

Choose a reason for hiding this comment

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

What is the usecase of this function and the one underneath? when should and can this be used?

@RequiresUserPermissions('ManageGuild')
@RequiresGuildContext()
@RequiresClientPermissions(defaultClientPermissions)
@RequiresUserPermissions(defaultUserPermissions)
Copy link
Member

Choose a reason for hiding this comment

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

the user needs the manage roles or manage server to be able to use the /birthday test command.

Copy link
Member

Choose a reason for hiding this comment

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

ah are the permission levels for this?

@@ -37,7 +43,10 @@ export class UserRoute extends Route {
private async voteProcess(provider: VoteProvider, userId: string) {
const providerInfo = this.getProviderInfo(provider);

const guild = await getGuildInformation(GuildIDEnum.BIRTHDAYY_HQ);
const guild = await resolveOnErrorCodesDiscord(
Copy link
Member

Choose a reason for hiding this comment

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

since this is a secario, that we often will face (fetching discord information) i would suggest creating a seperate function for this.

@nikolaischunk
Copy link
Member

nikolaischunk commented Aug 15, 2023

  • Check if all Commands are working as expected before merging
  • Check that the bot runs successfully on all developers machines
  • Check that the docker image for dev and normal works as expected.
  • Investigate sentry & log erros

@swiizyy
Copy link
Member Author

swiizyy commented Sep 1, 2023

  • Refactor config command
  • Refactor blacklist command
  • Check review utils folders for optimize functions
  • Rewrite preconditions system
  • Reorder commands in folders
  • Rewrite env variable

@swiizyy swiizyy requested review from nikolaischunk and removed request for nikolaischunk September 9, 2023 22:17
@swiizyy swiizyy merged commit 445583f into develop Sep 12, 2023
4 checks passed
@swiizyy swiizyy deleted the refactor/some-refactors branch January 3, 2024 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command This is related to a Command dependencies Dependencie related translations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants