protected function getChatCommands(ManialinkInterface $manialink)
    {
        $login = $manialink->getUserGroup()->getLogins()[0];

        return array_map(
            function ($command) {
                /** @var AbstractChatCommand $command */
                return [
                    'command' => $command->getCommand(),
                    'description' => $command->getDescription(),
                    'help' => $command->getHelp(),
                    'aliases' => $command->getAliases(),
                ];
            },
            array_filter(
                $this->chatCommands->getChatCommands(),
                function ($command) use ($login) {
                    if ($command instanceof AbstractAdminChatCommand) {
                        return $command->hasPermission($login);
                    }

                    return true;
                }

            )
        );
    }