Updated Methods

This commit is contained in:
netkas 2024-09-30 12:22:12 -04:00
parent 67230e35ba
commit 1e3824a87a
2 changed files with 12 additions and 1 deletions

View file

@ -4,11 +4,17 @@
use TgBotLib\Bot;
use TgBotLib\Exceptions\TelegramException;
use TgBotLib\Methods\Close;
use TgBotLib\Methods\GetMe;
use TgBotLib\Methods\Logout;
use TgBotLib\Methods\SendMessage;
enum Methods : string
{
case GET_ME = 'getMe';
case LOGOUT = 'logOut';
case CLOSE = 'close';
case SEND_MESSAGE = 'sendMessage';
/**
* Executes a command on the provided bot with the given parameters.
@ -23,6 +29,9 @@
return match($this)
{
self::GET_ME => GetMe::execute($bot, $parameters),
self::LOGOUT => LogOut::execute($bot, $parameters),
self::CLOSE => Close::execute($bot, $parameters),
self::SEND_MESSAGE => SendMessage::execute($bot, $parameters),
};
}
}