progdisc/AwesomeBot

View on GitHub
commands/vote/vote.js

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 4 of 4 total issues

Function processVote has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function processVote(type, bot, message, guild, member) {
let voting = currentVotes[type][member.user.username];
 
if (!voting) {
// sets a timeout for this voting
Severity: Minor
Found in commands/vote/vote.js - About 1 hr to fix

    Function processVote has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function processVote(type, bot, message, guild, member) {
    Severity: Minor
    Found in commands/vote/vote.js - About 35 mins to fix

      Avoid too many return statements within this function.
      Open

      return false;
      Severity: Major
      Found in commands/vote/vote.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

        return false;
        Severity: Major
        Found in commands/vote/vote.js - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status