Skip to content

New commands not work #11

Closed
Closed
@paranoiasystem

Description

@paranoiasystem

I have wrote a new command based on help command

<?php
namespace Longman\TelegramBot\Commands;

use Longman\TelegramBot\Request;
use Longman\TelegramBot\Command;
use Longman\TelegramBot\Entities\Update;

class NicoCommand extends Command
{
    public function execute() {
        $update = $this->getUpdate();
        $message = $this->getMessage();

        $chat_id = $message->getChat()->getId();
        $text = $message->getText(true);

        $data = array();
        $data['chat_id'] = $chat_id;
        $data['text'] = "Sorry, ........";

        $result = Request::sendMessage($data);
    }
}

But when I write /nico it not work 😢

What's wrong ?

(Sorry for my bad english 😁 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions