Slowmode command #19

Closed
DedShotTM wants to merge 28 commits from Slowmode into dev
DedShotTM commented 2020-04-17 21:14:05 -04:00 (Migrated from gitlab.libraryofcode.org)

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

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
matthew commented 2020-04-17 21:16:44 -04:00 (Migrated from gitlab.libraryofcode.org)

Would you just specify 0 to disable the slowmode?

Would you just specify `0` to disable the slowmode?
DedShotTM commented 2020-04-17 21:17:09 -04:00 (Migrated from gitlab.libraryofcode.org)

That's correct.

That's correct.
DedShotTM commented 2020-04-24 03:55:35 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

  • e360798c - Deleted slowmode.ts because it's in wrong location

Compare with previous version

added 1 commit <ul><li>e360798c - Deleted slowmode.ts because it&#39;s in wrong location</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=339&start_sha=36d02a8f122a009dec092dcd0a894c9746022a92)
DedShotTM commented 2020-04-24 03:57:22 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

Compare with previous version

added 1 commit <ul><li>76d00bae - using the correct location</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=340&start_sha=e360798cc60a851c665d17cb0de59bbda819afce)
DedShotTM commented 2020-04-24 03:57:45 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

Compare with previous version

added 1 commit <ul><li>7225368b - wrong location 2</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=341&start_sha=76d00baeb8da67a32d52ed81c4ff37385541a924)
DedShotTM commented 2020-04-24 03:58:35 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

Compare with previous version

added 1 commit <ul><li>e892d7a6 - correct location 2</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=342&start_sha=7225368b4fd7d6b3505aba75695c3e39a4e48808)
matthew commented 2020-04-30 19:46:41 -04:00 (Migrated from gitlab.libraryofcode.org)

Is this ready for another review?

Is this ready for another review?
DedShotTM commented 2020-05-01 11:46:46 -04:00 (Migrated from gitlab.libraryofcode.org)

Yes, if you are good with the permission set to 1.

Yes, if you are good with the permission set to 1.
matthew commented 2020-05-03 14:47:45 -04:00 (Migrated from gitlab.libraryofcode.org)

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.

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`.
matthew commented 2020-05-03 14:48:03 -04:00 (Migrated from gitlab.libraryofcode.org)

Refusing to merge, command should use moment for time conversions.

Refusing to merge, command should use moment for time conversions.
DedShotTM commented 2020-05-05 06:52:36 -04:00 (Migrated from gitlab.libraryofcode.org)

I don't really have any experience with this libary and I think it would be better if you did that.

I don't really have any experience with this libary and I think it would be better if you did that.
Khaazz commented 2020-05-12 15:51:55 -04:00 (Migrated from gitlab.libraryofcode.org)

approved this merge request

approved this merge request
matthew commented 2020-05-12 16:15:29 -04:00 (Migrated from gitlab.libraryofcode.org)

mentioned in issue #5

mentioned in issue #5
DedShotTM commented 2020-05-15 21:35:53 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

  • 45298670 - Used moment instead of a custom time parser

Compare with previous version

added 1 commit <ul><li>45298670 - Used moment instead of a custom time parser</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=358&start_sha=e892d7a6d6f42959d2bbcac19899494b05b7783f)
DedShotTM commented 2020-05-15 21:40:16 -04:00 (Migrated from gitlab.libraryofcode.org)

Managed to fix that. 45298670

Managed to fix that. [45298670](https://gitlab.libraryofcode.org/engineering/communityrelations/-/merge_requests/6/diffs?commit_id=4529867037d929cbed385d64a1f9d4c38d091a48)
Bsian commented 2020-05-16 08:35:00 -04:00 (Migrated from gitlab.libraryofcode.org)

Export the file in index.ts too

Export the file in index.ts too
Bsian commented 2020-05-16 09:51:02 -04:00 (Migrated from gitlab.libraryofcode.org)
      const [length, unit] = args[0].match(/[a-z]+|[^a-z]+/gi);
      if (isNaN(length)) return this.error(message.channel, 'Could not determine the slowmode time.');

      const duration = moment.duration(length, unit as unitOfTime.Base || 's').asSeconds();
```suggestion:-0+8 const [length, unit] = args[0].match(/[a-z]+|[^a-z]+/gi); if (isNaN(length)) return this.error(message.channel, 'Could not determine the slowmode time.'); const duration = moment.duration(length, unit as unitOfTime.Base || 's').asSeconds(); ```
Bsian commented 2020-05-16 09:52:01 -04:00 (Migrated from gitlab.libraryofcode.org)

TLDR:

  • if (args[0]) is obsolete since we already check if there are args
  • Optimise the way we calculate the length and unit
TLDR: - `if (args[0])` is obsolete since we already check if there are args - Optimise the way we calculate the length and unit
Bsian commented 2020-05-16 09:56:24 -04:00 (Migrated from gitlab.libraryofcode.org)
      if (duration.asSeconds() > 21600 || duration.asSeconds() < 0) return this.error(message.channel, 'Slowmode must be between 0 seconds and 6 hours.');
      if (duration.asSeconds() % 1) return this.error(message.channel, 'Slowmode cannot have decimals');
```suggestion:-0+0 if (duration.asSeconds() > 21600 || duration.asSeconds() < 0) return this.error(message.channel, 'Slowmode must be between 0 seconds and 6 hours.'); if (duration.asSeconds() % 1) return this.error(message.channel, 'Slowmode cannot have decimals'); ```
Bsian commented 2020-05-16 10:17:55 -04:00 (Migrated from gitlab.libraryofcode.org)

Fix this in parameter

```suggestion:-0+0 ``` Fix this in parameter
Bsian commented 2020-05-16 10:18:22 -04:00 (Migrated from gitlab.libraryofcode.org)
  public async run(message: Message<GuildTextableChannel>, args: string[]) {
```suggestion:-0+0 public async run(message: Message<GuildTextableChannel>, args: string[]) { ```
Bsian commented 2020-05-16 10:18:35 -04:00 (Migrated from gitlab.libraryofcode.org)
import { Message, GuildTextableChannel } from 'eris';
```suggestion:-0+0 import { Message, GuildTextableChannel } from 'eris'; ```
Bsian commented 2020-05-16 10:52:46 -04:00 (Migrated from gitlab.libraryofcode.org)
      return message.channel.edit({ rateLimitPerUser: duration.asSeconds() }).then((c) => this.sendSuccess(c, `Slowmode set to ${this.formatDuration(duration)}`);
    } catch (err) {
      return this.client.util.handleError(err, message, this);
    }
  }

  public formatDuration(duration: moment.Duration) {
    const arr = [];
    if (duration.hours()) arr.push(`${duration.hours()} hours`);
    if (duration.minutes()) arr.push(`${duration.minutes()} minutes`);
    if (!arr.length || duration.seconds()) arr.push(`${duration.minutes()} seconds`);
    return arr.join(', ');
  }
```suggestion:-0+3 return message.channel.edit({ rateLimitPerUser: duration.asSeconds() }).then((c) => this.sendSuccess(c, `Slowmode set to ${this.formatDuration(duration)}`); } catch (err) { return this.client.util.handleError(err, message, this); } } public formatDuration(duration: moment.Duration) { const arr = []; if (duration.hours()) arr.push(`${duration.hours()} hours`); if (duration.minutes()) arr.push(`${duration.minutes()} minutes`); if (!arr.length || duration.seconds()) arr.push(`${duration.minutes()} seconds`); return arr.join(', '); } ```
Bsian commented 2020-05-16 11:17:30 -04:00 (Migrated from gitlab.libraryofcode.org)

Also you may want to update your fork

git remote add upstream https://gitlab.libraryofcode.org/engineering/communityrelations.git
git fetch upstream
git pull --no-ff upstream/dev
Also you may want to update your fork ``` git remote add upstream https://gitlab.libraryofcode.org/engineering/communityrelations.git git fetch upstream git pull --no-ff upstream/dev ```
Bsian commented 2020-05-16 20:10:53 -04:00 (Migrated from gitlab.libraryofcode.org)

mentioned in merge request !7

mentioned in merge request !7
DedShotTM commented 2020-05-17 17:46:51 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=363&start_sha=4529867037d929cbed385d64a1f9d4c38d091a48#54c8941949794199415db6561c8229d2fed82abd_20_20)
DedShotTM commented 2020-05-17 17:46:52 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=363&start_sha=4529867037d929cbed385d64a1f9d4c38d091a48#54c8941949794199415db6561c8229d2fed82abd_29_26)
DedShotTM commented 2020-05-17 17:46:53 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=363&start_sha=4529867037d929cbed385d64a1f9d4c38d091a48#54c8941949794199415db6561c8229d2fed82abd_30_26)
DedShotTM commented 2020-05-17 17:46:53 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=363&start_sha=4529867037d929cbed385d64a1f9d4c38d091a48#54c8941949794199415db6561c8229d2fed82abd_16_16)
DedShotTM commented 2020-05-17 17:46:53 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=363&start_sha=4529867037d929cbed385d64a1f9d4c38d091a48#54c8941949794199415db6561c8229d2fed82abd_1_1)
DedShotTM commented 2020-05-17 17:46:54 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=363&start_sha=4529867037d929cbed385d64a1f9d4c38d091a48#54c8941949794199415db6561c8229d2fed82abd_31_26)
DedShotTM commented 2020-05-17 17:46:55 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

  • f92d5132 - few changes in the slowmode command (Bsian)

Compare with previous version

added 1 commit <ul><li>f92d5132 - few changes in the slowmode command (Bsian)</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=363&start_sha=4529867037d929cbed385d64a1f9d4c38d091a48)
DedShotTM commented 2020-05-17 17:49:51 -04:00 (Migrated from gitlab.libraryofcode.org)
  1. Fixed the first point
  2. Nah this would break the if statement that will check if the slowmode time was found
1. Fixed the first point 2. Nah this would break the if statement that will check if the slowmode time was found
DedShotTM commented 2020-05-17 17:50:38 -04:00 (Migrated from gitlab.libraryofcode.org)

Done

Done
DedShotTM commented 2020-05-17 17:50:55 -04:00 (Migrated from gitlab.libraryofcode.org)

Done

Done
DedShotTM commented 2020-05-17 17:51:07 -04:00 (Migrated from gitlab.libraryofcode.org)

Done

Done
DedShotTM commented 2020-05-17 17:52:23 -04:00 (Migrated from gitlab.libraryofcode.org)

It will react to the user's message instead of sending a message

It will react to the user's message instead of sending a message
Bsian commented 2020-05-17 20:25:43 -04:00 (Migrated from gitlab.libraryofcode.org)

add a || [null, null] to the end of the match function then

add a `|| [null, null]` to the end of the match function then
Bsian commented 2020-05-17 20:28:16 -04:00 (Migrated from gitlab.libraryofcode.org)

Where does it react? Right now it does nothing

Where does it react? Right now it does nothing
Bsian commented 2020-05-17 20:31:03 -04:00 (Migrated from gitlab.libraryofcode.org)

Oh I see now

Oh I see now
Bsian commented 2020-05-17 20:33:22 -04:00 (Migrated from gitlab.libraryofcode.org)

Still need to handle decimal numbers

Still need to handle decimal numbers
DedShotTM commented 2020-05-18 22:20:13 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

  • 9b2cebde - handle decimal numbers in slowmode command (Bsian)

Compare with previous version

added 1 commit <ul><li>9b2cebde - handle decimal numbers in slowmode command (Bsian)</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=364&start_sha=f92d51323b00043789ad79dc4d31a0485008ffa7)
DedShotTM commented 2020-05-18 22:20:26 -04:00 (Migrated from gitlab.libraryofcode.org)

Wouldn't make a difference

Wouldn't make a difference
DedShotTM commented 2020-05-18 22:20:53 -04:00 (Migrated from gitlab.libraryofcode.org)

Fixed

Fixed
DedShotTM commented 2020-05-18 22:26:07 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

  • 34239aa8 - added slowmode in src/commands/index.ts

Compare with previous version

added 1 commit <ul><li>34239aa8 - added slowmode in src/commands/index.ts</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=365&start_sha=9b2cebde85a82b1ab905c9dbf5d738dea3ef3377)
DedShotTM commented 2020-05-18 22:26:10 -04:00 (Migrated from gitlab.libraryofcode.org)

Done

Done
DedShotTM commented 2020-05-18 22:26:11 -04:00 (Migrated from gitlab.libraryofcode.org)

resolved all threads

resolved all threads
DedShotTM commented 2020-05-18 22:55:41 -04:00 (Migrated from gitlab.libraryofcode.org)

added 83 commits

  • 34239aa8...9e88445b - 82 commits from branch engineering:dev
  • d4ef0db1 - fixed conflict

Compare with previous version

added 83 commits <ul><li>34239aa8...9e88445b - 82 commits from branch <code>engineering:dev</code></li><li>d4ef0db1 - fixed conflict</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=366&start_sha=34239aa8fafd054af09d9af3492b5783982aaaa2)
Bsian commented 2020-05-19 05:25:42 -04:00 (Migrated from gitlab.libraryofcode.org)

Again, optimisation, hence why I mentioned it

Again, optimisation, hence why I mentioned it
DedShotTM commented 2020-05-19 22:51:28 -04:00 (Migrated from gitlab.libraryofcode.org)

Adding that does nothing as we saw in Discord

Adding that does nothing as we saw in Discord
DedShotTM commented 2020-05-19 22:51:29 -04:00 (Migrated from gitlab.libraryofcode.org)

resolved all threads

resolved all threads
matthew commented 2020-05-19 22:54:01 -04:00 (Migrated from gitlab.libraryofcode.org)

For anyone reading this in the future, please merge the commits rather than rebase.
Thanks.

For anyone reading this in the future, please merge the commits rather than rebase. Thanks.
matthew commented 2020-05-19 22:54:21 -04:00 (Migrated from gitlab.libraryofcode.org)

resolved all threads

resolved all threads
matthew commented 2020-05-19 22:56:42 -04:00 (Migrated from gitlab.libraryofcode.org)

Requesting review from @Khaazz.

Requesting review from @Khaazz.
matthew commented 2020-05-19 22:57:06 -04:00 (Migrated from gitlab.libraryofcode.org)

assigned to @matthew, @Khaazz, and @Bsian

assigned to @matthew, @Khaazz, and @Bsian
matthew commented 2020-05-19 22:57:45 -04:00 (Migrated from gitlab.libraryofcode.org)

added 4mo 2w 1d 2h of time spent at 2020-05-19

added 4mo 2w 1d 2h of time spent at 2020-05-19
matthew commented 2020-05-19 22:58:40 -04:00 (Migrated from gitlab.libraryofcode.org)

removed time spent

removed time spent
matthew commented 2020-05-19 22:59:09 -04:00 (Migrated from gitlab.libraryofcode.org)

added 2mo 2w of time spent at 2020-05-19

added 2mo 2w of time spent at 2020-05-19
matthew commented 2020-05-19 22:59:32 -04:00 (Migrated from gitlab.libraryofcode.org)

removed time spent

removed time spent
matthew commented 2020-05-19 22:59:39 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1mo 1w of time spent at 2020-05-19

added 1mo 1w of time spent at 2020-05-19
DedShotTM commented 2020-05-19 23:01:13 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

Compare with previous version

added 1 commit <ul><li>8316ff53 - added new line</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=371&start_sha=d4ef0db1cf4a39951d59c62d7a0943145f4f6a02)
Bsian commented 2020-05-20 03:38:46 -04:00 (Migrated from gitlab.libraryofcode.org)

I've edited my diff, please look at the changes

I've edited my diff, please look at the changes
Khaazz commented 2020-05-20 05:33:54 -04:00 (Migrated from gitlab.libraryofcode.org)

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)

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)
Khaazz commented 2020-05-20 05:33:55 -04:00 (Migrated from gitlab.libraryofcode.org)

isn't isNaN already a js global?

isn't isNaN already a js global?
Khaazz commented 2020-05-20 05:33:55 -04:00 (Migrated from gitlab.libraryofcode.org)

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

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
Bsian commented 2020-05-20 06:45:59 -04:00 (Migrated from gitlab.libraryofcode.org)

Linting prevents this

Linting prevents this
Khaazz commented 2020-05-20 07:49:25 -04:00 (Migrated from gitlab.libraryofcode.org)

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 just isNan, that good 👍

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 just `isNan`, that good :thumbsup:
DedShotTM commented 2020-05-20 22:24:51 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 14 of the diff

changed this line in [version 14 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=373&start_sha=8316ff53cdee895a512a1b4ed171e1ac8af81762#54c8941949794199415db6561c8229d2fed82abd_20_20)
DedShotTM commented 2020-05-20 22:24:52 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 14 of the diff

changed this line in [version 14 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=373&start_sha=8316ff53cdee895a512a1b4ed171e1ac8af81762#54c8941949794199415db6561c8229d2fed82abd_21_20)
DedShotTM commented 2020-05-20 22:24:54 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

  • 5cd7cb7b - isNaN() instead of Number.isNaN()

Compare with previous version

added 1 commit <ul><li>5cd7cb7b - isNaN() instead of Number.isNaN()</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=373&start_sha=8316ff53cdee895a512a1b4ed171e1ac8af81762)
DedShotTM commented 2020-05-20 22:25:32 -04:00 (Migrated from gitlab.libraryofcode.org)

I kept the duration variable type - 5cd7cb7b

I kept the duration variable type - [5cd7cb7b](https://gitlab.libraryofcode.org/engineering/communityrelations/-/merge_requests/6/diffs?commit_id=5cd7cb7bf2410d2a7187aa8aaebcfc2e9ae28761)
Bsian commented 2020-05-21 00:48:14 -04:00 (Migrated from gitlab.libraryofcode.org)
      if (!!momentSeconds && (momentSeconds % 1) === 0) return this.error(message.channel, 'Slowmode cannot have decimals');
```suggestion:-0+0 if (!!momentSeconds && (momentSeconds % 1) === 0) return this.error(message.channel, 'Slowmode cannot have decimals'); ```
DedShotTM commented 2020-05-22 22:51:38 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 15 of the diff

changed this line in [version 15 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=374&start_sha=5cd7cb7bf2410d2a7187aa8aaebcfc2e9ae28761#54c8941949794199415db6561c8229d2fed82abd_26_26)
DedShotTM commented 2020-05-22 22:51:39 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

  • 34d363b0 - round decimal instead of cancelling the command (Khaaz)

Compare with previous version

added 1 commit <ul><li>34d363b0 - round decimal instead of cancelling the command (Khaaz)</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=374&start_sha=5cd7cb7bf2410d2a7187aa8aaebcfc2e9ae28761)
DedShotTM commented 2020-05-22 22:57:29 -04:00 (Migrated from gitlab.libraryofcode.org)

rounding seems to be the best idea > 34d363b0

rounding seems to be the best idea > [34d363b0](https://gitlab.libraryofcode.org/engineering/communityrelations/-/merge_requests/6/diffs?commit_id=34d363b07113c728ed28fcaba85018cdbacbeb94)
DedShotTM commented 2020-05-22 22:59:54 -04:00 (Migrated from gitlab.libraryofcode.org)

Should the property be in the constructor or in the run function @Khaazz ?

Should the property be in the constructor or in the run function @Khaazz ?
DedShotTM commented 2020-05-23 04:01:30 -04:00 (Migrated from gitlab.libraryofcode.org)

Are you sure it's necessary? I've seen other commands doing regexs without a class property

Are you sure it's necessary? I've seen other commands doing regexs without a class property
Bsian commented 2020-05-23 07:19:48 -04:00 (Migrated from gitlab.libraryofcode.org)

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 read

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 read
Bsian commented 2020-05-23 07:20:16 -04:00 (Migrated from gitlab.libraryofcode.org)

Place this in alphabetical order please

Place this in alphabetical order please
Bsian commented 2020-05-23 07:27:24 -04:00 (Migrated from gitlab.libraryofcode.org)
      if (Number.isNaN(Number(length))) return this.error(message.channel, 'Could not determine the slowmode time.');
```suggestion:-1+0 if (Number.isNaN(Number(length))) return this.error(message.channel, 'Could not determine the slowmode time.'); ```
Bsian commented 2020-05-23 07:28:59 -04:00 (Migrated from gitlab.libraryofcode.org)
      const momentSeconds = Math.round(moment.duration(length, unit as unitOfTime.Base || 's').asSeconds());

Try not to unnecessarily convert to string just to convert back into a number

```suggestion:-0+0 const momentSeconds = Math.round(moment.duration(length, unit as unitOfTime.Base || 's').asSeconds()); ``` Try not to unnecessarily convert to string just to convert back into a number
DedShotTM commented 2020-05-26 19:41:07 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 16 of the diff

changed this line in [version 16 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=375&start_sha=34d363b07113c728ed28fcaba85018cdbacbeb94#54c8941949794199415db6561c8229d2fed82abd_22_23)
DedShotTM commented 2020-05-26 19:41:07 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 16 of the diff

changed this line in [version 16 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=375&start_sha=34d363b07113c728ed28fcaba85018cdbacbeb94#54c8941949794199415db6561c8229d2fed82abd_23_23)
DedShotTM commented 2020-05-26 19:41:09 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

Compare with previous version

added 1 commit <ul><li>cba3456e - regex in constructor</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=375&start_sha=34d363b07113c728ed28fcaba85018cdbacbeb94)
DedShotTM commented 2020-05-26 19:45:13 -04:00 (Migrated from gitlab.libraryofcode.org)

done

done
DedShotTM commented 2020-08-20 12:46:22 -04:00 (Migrated from gitlab.libraryofcode.org)

changed this line in version 18 of the diff

changed this line in [version 18 of the diff](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=384&start_sha=cba3456e37364c4a54bb75e852a4fe2fc323fb0b#425a68e84fcfd338e028d85506d99733bdd2a7ee_18_32)
DedShotTM commented 2020-08-20 12:46:25 -04:00 (Migrated from gitlab.libraryofcode.org)

added 1 commit

Compare with previous version

added 1 commit <ul><li>d9420239 - alphabetical order (Bsian)</li></ul> [Compare with previous version](/engineering/communityrelations/-/merge_requests/6/diffs?diff_id=384&start_sha=cba3456e37364c4a54bb75e852a4fe2fc323fb0b)
DedShotTM commented 2020-08-20 12:46:46 -04:00 (Migrated from gitlab.libraryofcode.org)

resolved all threads

resolved all threads
DedShotTM commented 2020-08-20 12:59:22 -04:00 (Migrated from gitlab.libraryofcode.org)

closed

closed
DedShotTM commented 2020-08-20 13:12:09 -04:00 (Migrated from gitlab.libraryofcode.org)

mentioned in merge request !15

mentioned in merge request !15
DedShotTM commented 2020-08-20 13:12:41 -04:00 (Migrated from gitlab.libraryofcode.org)

changed the description

changed the description

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
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: engineering/community-relations#19
There is no content yet.