MoT3rror / egginc-coop-tracker

0 stars 1 forks source link

Support new lines in "add coop" command #7

Closed MoT3rror closed 3 years ago

MoT3rror commented 3 years ago

Example:

eb!add ion-production-2021 idriveadv1a
idriveadv2l
idriveadv3d
idriveadv4c
idriveadv5m
idriveadv6j
idriveadv7w
idriveadv8f
idriveadv9k
 idriveadv10t
 idriveadv11a
 idriveadv12p
 idriveadv13r
 idriveadv14o
ayavilevich commented 3 years ago

ok, that looks simple enough.

is

eb!add ion-production-2021 idriveadv1a idriveadv2l idriveadv3d

the same as doing 3 separate calls:

eb!add ion-production-2021 idriveadv1a
eb!add ion-production-2021 idriveadv2l
eb!add ion-production-2021 idriveadv3d
MoT3rror commented 3 years ago

There is a test here (https://github.com/MoT3rror/egginc-coop-tracker/blob/master/tests/Feature/Http/Controllers/Api/DiscordMessageTest.php#L200-L227).

I am fine with adding another test in there but near feature want to get rid of this large test class. I can handle that refactor.

ayavilevich commented 3 years ago

@MoT3rror should we do this at the "add" command level or for all commands at the app/Http/Controllers/Api/DiscordMessage.php level? Looks like it could be relevant for other commands as well, but checking first.

MoT3rror commented 3 years ago

I am fine with doing it in DiscordMessage.

MoT3rror commented 3 years ago

If space before coop name, will cause blank entry in DB. Example:

eb!add quantum-payload-2021
coop1
coop3
 coop4
 coop5
ayavilevich commented 3 years ago

merged