<commit_before>local utilities = require('otouto.utilities')

local P = {}

function P:init(bot)
    self.triggers = utilities.triggers(bot.info.username, bot.config.cmd_pat)
        :t('groups', true):t('listgroups', true).table
    self.command = 'groups [query]'
    self.doc = "/groups [query]\
Returns a list of all public, administrated groups, or the results of a query."
end

function P:action(bot, msg, _group)
    local input = utilities.input_from_msg(msg)

    -- Output will be a list of results, a list of all groups, or an explanation<commit_msg>fixed listgroups not matching capitalized queries<commit_after>local utilities = require('otouto.utilities')

local P = {}

function P:init(bot)
    self.triggers = utilities.triggers(bot.info.username, bot.config.cmd_pat)
        :t('groups', true):t('listgroups', true).table
    self.command = 'groups [query]'
    self.doc = "/groups [query]\
Returns a list of all public, administrated groups, or the results of a query."
end

function P:action(bot, msg, _group)
    local input = utilities.input_from_msg(msg)
    input = input and input:lower()

    -- Output will be a list of results, a list of all groups, or an explanation
{'fraction_non_alphanumeric': 0.11725293132328309, 'fraction_numerical': 0.0, 'mean_word_length': 4.042194092827004, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '347677', 'n_tokens_mistral': 368, 'n_tokens_neox': 357, 'n_words': 120}