Lichess4545/Chesster

View on GitHub
src/commands/presence.ts

Summary

Maintainability
A
2 hrs
Test Coverage

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

export async function ambientPresence(bot: SlackBot, message: CommandMessage) {
    if (!message.channel.is_mpim) {
        return
    }
    const sender = bot.users.getByNameOrID(message.user)
Severity: Minor
Found in src/commands/presence.ts - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

        return await heltour.playerContact(
            bot.config.heltour,
            sender.lichess_username,
            player.lichess_username
        )
    Severity: Major
    Found in src/commands/presence.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return
      Severity: Major
      Found in src/commands/presence.ts - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status