ConnorFTW / discord-bot-creator

Create your Discord bot in less than 30 minutes.
https://discord-bot-creator.app/
Other
20 stars 6 forks source link

(JS-0093) Avoid having unused expressions #6

Closed m5x5 closed 3 years ago

m5x5 commented 3 years ago

Description

An unused expression that does not affect the state of the program indicates a logic error.

Occurrences

There are 308 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Michael55555/discord-bot-creator/issue/JS-0093/occurrences/

omeiirr commented 3 years ago

Do you need all of them removed? Also, does it have to be in a single commit?

I can work on this.

m5x5 commented 3 years ago

It can be both, free to put it in commits that are easy to review 😄 @omeiirr Thanks for your interest in contributing!

omeiirr commented 3 years ago

Happy to help! 😄

I can group them in parts according to the pages here.

One commit for every page, 13 commits in total. Does that work for you?

m5x5 commented 3 years ago

Sure, I'm really sorry for the late reply. Haven't seen your message 😦

omeiirr commented 3 years ago

Ah no problem, happens to the best of us 😂

Just one more question. By removing unused expressions, do you mean

converting this image

to

  break;
case 3: // Game
  url += `games/top?limit=${searchResults}`;

and this image

to

const channel = this.getChannel(storage, varName, cache);

Or am I missing something?

m5x5 commented 3 years ago

It seems like DeepSource misidentified something here. I removed the wrong occurrences and in the end it comes down to just one fix 😅

omeiirr commented 3 years ago

Haha, great man 😂 At least now we know AI won't take over humanity just yet 👀

Please close this issue if no further changes are required.

m5x5 commented 3 years ago

Sounds good, if you want you can take on issue #10 I'm sure that it's going to be a nice challenge ;))