Add SendPoll method with tests and enhance Poll object

This commit is contained in:
netkas 2024-10-10 13:20:40 -04:00
parent 33f7a094fc
commit 9a4e537294
6 changed files with 234 additions and 11 deletions

View file

@ -21,6 +21,7 @@
use TgBotLib\Methods\SendMessage;
use TgBotLib\Methods\SendPaidMedia;
use TgBotLib\Methods\SendPhoto;
use TgBotLib\Methods\SendPoll;
use TgBotLib\Methods\SendVenue;
use TgBotLib\Methods\SendVideo;
use TgBotLib\Methods\SendVideoNote;
@ -48,6 +49,7 @@
case SEND_LOCATION = 'sendLocation';
case SEND_VENUE = 'sendVenue';
case SEND_CONTACT = 'sendContact';
case SEND_POLL = 'sendPoll';
/**
* Executes a command on the provided bot with the given parameters.
@ -81,6 +83,7 @@
self::SEND_LOCATION => SendLocation::execute($bot, $parameters),
self::SEND_VENUE => SendVenue::execute($bot, $parameters),
self::SEND_CONTACT => SendContact::execute($bot, $parameters),
self::SEND_POLL => SendPoll::execute($bot, $parameters),
};
}
}