Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't have more than 1 class for generics messages #1428

Open
mtalaeii opened this issue Oct 27, 2023 · 1 comment
Open

Can't have more than 1 class for generics messages #1428

mtalaeii opened this issue Oct 27, 2023 · 1 comment
Labels

Comments

@mtalaeii
Copy link

mtalaeii commented Oct 27, 2023

🐞 Bug Report

Required Information

? !
Operating system Ubuntu 22
PHP Telegram Bot version 0.81.0
PHP version 8.2.9
MySQL version mariadb 11
Update Method Webhook
Self-signed certificate no

Summary

This bug is very bad bug actually i want have more than 1 class for generic message .

Current behaviour

This is necessary that the class name is GenericmessageCommand and the $name is genericmessasge to execute generic commands this is my code

class ManagechannelsCommand extends SystemCommand
{
    protected $private_only = true;
    protected $name = 'managechannels';

    /**
     * @inheritDoc
     */
    public function execute(): ServerResponse
    {
        if ($this->getMessage()->getText(true) != '.....') {
            return Request::emptyResponse();
        }
        ......
        return $this->replyToUser('.......');
    }
}

Expected behaviour

I expecte if we dont have usage then the class maybe is one of genericmessage command classes then its just executed with any type of message

@mtalaeii mtalaeii added the bug label Oct 27, 2023
@Hitmare
Copy link
Collaborator

Hitmare commented May 13, 2024

Hello

Do you still need help with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants