otiai10/amesh-bot

View on GitHub
bot/bot.go

Summary

Maintainability
A
35 mins
Test Coverage

Method Bot.handle has 5 return statements (exceeds 4 allowed).
Open

func (b *Bot) handle(ctx context.Context, client service.ISlackClient, event slackevents.AppMentionEvent) *CommandError {
    if tokens := largo.Tokenize(event.Text)[1:]; len(tokens) != 0 && tokens[0] == "help" {
        return errwrap(b.Help(ctx, client, event), "builtin:help", event)
    }
    for _, cmd := range b.Commands {
Severity: Major
Found in bot/bot.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status