Add ability to register commands and events to specific environments #50

Merged
Vylpes merged 2 commits from feature/38-command-envs into develop 2023-10-14 17:07:29 +01:00
Owner

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

  • Add ability to register commands and events to specific environments
  • These will default to every environment if not specified, so existing commands will still work as is
  • Environment is a flag so you can specify multiple environments

#38

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

  • This has been tested locally by making sure commands are registered that are specified as the one in the config

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that provde my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
# Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. - Add ability to register commands and events to specific environments - These will default to every environment if not specified, so existing commands will still work as is - Environment is a flag so you can specify multiple environments #38 ## Type of change Please delete options that are not relevant. - [x] New feature (non-breaking change which adds functionality) # How Has This Been Tested? Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration. - This has been tested locally by making sure commands are registered that are specified as the one in the config # Checklist - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that provde my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
Vylpes added 1 commit 2023-09-29 18:21:37 +01:00
Add ability to register commands and events to specific environments
All checks were successful
continuous-integration/drone/push Build is passing
8ddf52a552
Vylpes requested review from VylpesTester 2023-09-29 18:21:42 +01:00
Vylpes added the
type
story
label 2023-09-29 18:21:47 +01:00
Vylpes added this to the 0.2.0 milestone 2023-09-29 18:21:50 +01:00
VylpesTester was assigned by Vylpes 2023-09-29 18:21:55 +01:00
VylpesTester requested changes 2023-10-06 21:06:42 +01:00
@ -16,0 +15,4 @@
for (let command of globalCommands) {
if (!command.Command.CommandBuilder) continue;
if ((command.Environment & CoreClient.Environment) == CoreClient.Environment) {
Member

Should we be using the same &= as above? To keep it consistent.

Should we be using the same `&=` as above? To keep it consistent.
Vylpes marked this conversation as resolved
@ -38,0 +43,4 @@
for (let command of guildCommands.filter(x => x.ServerId == guild)) {
if (!command.Command.CommandBuilder) continue;
if ((command.Environment & CoreClient.Environment) == CoreClient.Environment) {
Member

Should we be using the same &= as above? To keep it consistent.

Should we be using the same `&=` as above? To keep it consistent.
Vylpes marked this conversation as resolved
VylpesTester added spent time 2023-10-06 21:07:26 +01:00
5 minutes
Vylpes added 1 commit 2023-10-10 17:35:06 +01:00
Update env flag checker to be more consistent
All checks were successful
continuous-integration/drone/push Build is passing
b6944f0876
Vylpes requested review from VylpesTester 2023-10-10 17:35:44 +01:00
VylpesTester approved these changes 2023-10-14 17:07:12 +01:00
VylpesTester added spent time 2023-10-14 17:07:16 +01:00
5 minutes
Vylpes merged commit c5fc2760c4 into develop 2023-10-14 17:07:29 +01:00
Vylpes deleted branch feature/38-command-envs 2023-10-14 17:07:29 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 10 minutes
VylpesTester
10 minutes
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: External/card-drop#50
No description provided.