Slowmode command #19
No reviewers
Labels
No Label
Backlog
bug::Awaiting merge
bug::fix
bug::S1
bug::S2
bug::S3
change::Awaiting merge
change::breaking
change::minor
change::new
change::patch
Good First Issue
In Progress
priority::critical
priority::high
priority::low
priority::medium
proposal::accepted
proposal::denied
proposal::pending
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: engineering/community-relations#19
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "Slowmode"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
I assumed that the permission would be 1 (Associates Team+). If that's not what you wanted I'll change it.
EDIT: Continued in !15
Would you just specify
0
to disable the slowmode?That's correct.
added 1 commit
e360798c
- Deleted slowmode.ts because it's in wrong locationCompare with previous version
added 1 commit
76d00bae
- using the correct locationCompare with previous version
added 1 commit
7225368b
- wrong location 2Compare with previous version
added 1 commit
e892d7a6
- correct location 2Compare with previous version
Is this ready for another review?
Yes, if you are good with the permission set to 1.
We currently use the moment library for time conversions, I'm going to recommend that this command uses moment to perform the time calculations. You can see use cases of this being used in
src/commands/ban.ts
.Refusing to merge, command should use moment for time conversions.
I don't really have any experience with this libary and I think it would be better if you did that.
approved this merge request
mentioned in issue #5
added 1 commit
45298670
- Used moment instead of a custom time parserCompare with previous version
Managed to fix that. 45298670
Export the file in index.ts too
TLDR:
if (args[0])
is obsolete since we already check if there are argsFix this in parameter
Also you may want to update your fork
mentioned in merge request !7
changed this line in version 9 of the diff
changed this line in version 9 of the diff
changed this line in version 9 of the diff
changed this line in version 9 of the diff
changed this line in version 9 of the diff
changed this line in version 9 of the diff
added 1 commit
f92d5132
- few changes in the slowmode command (Bsian)Compare with previous version
Done
Done
Done
It will react to the user's message instead of sending a message
add a
|| [null, null]
to the end of the match function thenWhere does it react? Right now it does nothing
Oh I see now
Still need to handle decimal numbers
added 1 commit
9b2cebde
- handle decimal numbers in slowmode command (Bsian)Compare with previous version
Wouldn't make a difference
Fixed
added 1 commit
34239aa8
- added slowmode in src/commands/index.tsCompare with previous version
Done
resolved all threads
added 83 commits
engineering:dev
d4ef0db1
- fixed conflictCompare with previous version
Again, optimisation, hence why I mentioned it
Adding that does nothing as we saw in Discord
resolved all threads
For anyone reading this in the future, please merge the commits rather than rebase.
Thanks.
resolved all threads
Requesting review from @Khaazz.
assigned to @matthew, @Khaazz, and @Bsian
added 4mo 2w 1d 2h of time spent at 2020-05-19
removed time spent
added 2mo 2w of time spent at 2020-05-19
removed time spent
added 1mo 1w of time spent at 2020-05-19
added 1 commit
8316ff53
- added new lineCompare with previous version
I've edited my diff, please look at the changes
regex should be a class property in order to not recreate the regex everytime it runs. (
this.match
or whatever you want to name it)isn't isNaN already a js global?
I'd just cleanup decimal and round instead of cancelling the command entirely but that works I guess.
For that matters I'd also prefer explicit !== 0 check instead of implicit 0 == false
Linting prevents this
For that matters, I googled that: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN
Changing your code to conform to linting isn't a good idea, but since apparently
Number.isNaN
is better than justisNan
, that good 👍changed this line in version 14 of the diff
changed this line in version 14 of the diff
added 1 commit
5cd7cb7b
- isNaN() instead of Number.isNaN()Compare with previous version
I kept the duration variable type - 5cd7cb7b
changed this line in version 15 of the diff
added 1 commit
34d363b0
- round decimal instead of cancelling the command (Khaaz)Compare with previous version
rounding seems to be the best idea > 34d363b0
Should the property be in the constructor or in the run function @Khaazz ?
Are you sure it's necessary? I've seen other commands doing regexs without a class property
It's the same reason why other stuff is there.
this.error
isn't necessary but that saves us having to type more and more and makes it much more easier to readPlace this in alphabetical order please
Try not to unnecessarily convert to string just to convert back into a number
changed this line in version 16 of the diff
changed this line in version 16 of the diff
added 1 commit
cba3456e
- regex in constructorCompare with previous version
done
changed this line in version 18 of the diff
added 1 commit
d9420239
- alphabetical order (Bsian)Compare with previous version
resolved all threads
closed
mentioned in merge request !15
changed the description
Pull request closed