Add UnhideGeneralForumTopic method
This commit is contained in:
parent
18bd8ce69e
commit
ec7c4b5882
2 changed files with 40 additions and 0 deletions
|
@ -73,6 +73,7 @@
|
||||||
use TgBotLib\Methods\SetWebhook;
|
use TgBotLib\Methods\SetWebhook;
|
||||||
use TgBotLib\Methods\UnbanChatMember;
|
use TgBotLib\Methods\UnbanChatMember;
|
||||||
use TgBotLib\Methods\UnbanChatSenderChat;
|
use TgBotLib\Methods\UnbanChatSenderChat;
|
||||||
|
use TgBotLib\Methods\UnhideGeneralForumTopic;
|
||||||
use TgBotLib\Methods\UnpinAllChatMessages;
|
use TgBotLib\Methods\UnpinAllChatMessages;
|
||||||
use TgBotLib\Methods\UnpinAllForumTopicMessages;
|
use TgBotLib\Methods\UnpinAllForumTopicMessages;
|
||||||
use TgBotLib\Methods\UnpinChatMessage;
|
use TgBotLib\Methods\UnpinChatMessage;
|
||||||
|
@ -150,6 +151,7 @@
|
||||||
case CLOSE_GENERAL_FORUM_TOPIC = 'closeGeneralForumTopic';
|
case CLOSE_GENERAL_FORUM_TOPIC = 'closeGeneralForumTopic';
|
||||||
case REOPEN_GENERAL_FORUM_TOPIC = 'reopenGeneralForumTopic';
|
case REOPEN_GENERAL_FORUM_TOPIC = 'reopenGeneralForumTopic';
|
||||||
case HIDE_GENERAL_FORUM_TOPIC = 'hideGeneralForumTopic';
|
case HIDE_GENERAL_FORUM_TOPIC = 'hideGeneralForumTopic';
|
||||||
|
case UNHIDE_GENERAL_FORUM_TOPIC = 'unhideGeneralForumTopic';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a command on the provided bot with the given parameters.
|
* Executes a command on the provided bot with the given parameters.
|
||||||
|
@ -234,6 +236,7 @@
|
||||||
self::CLOSE_GENERAL_FORUM_TOPIC => CloseGeneralForumTopic::execute($bot, $parameters),
|
self::CLOSE_GENERAL_FORUM_TOPIC => CloseGeneralForumTopic::execute($bot, $parameters),
|
||||||
self::REOPEN_GENERAL_FORUM_TOPIC => ReopenGeneralForumTopic::execute($bot, $parameters),
|
self::REOPEN_GENERAL_FORUM_TOPIC => ReopenGeneralForumTopic::execute($bot, $parameters),
|
||||||
self::HIDE_GENERAL_FORUM_TOPIC => HideGeneralForumTopic::execute($bot, $parameters),
|
self::HIDE_GENERAL_FORUM_TOPIC => HideGeneralForumTopic::execute($bot, $parameters),
|
||||||
|
self::UNHIDE_GENERAL_FORUM_TOPIC => UnhideGeneralForumTopic::execute($bot, $parameters),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
37
src/TgBotLib/Methods/UnhideGeneralForumTopic.php
Normal file
37
src/TgBotLib/Methods/UnhideGeneralForumTopic.php
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TgBotLib\Methods;
|
||||||
|
|
||||||
|
use TgBotLib\Abstracts\Method;
|
||||||
|
use TgBotLib\Bot;
|
||||||
|
use TgBotLib\Enums\Methods;
|
||||||
|
|
||||||
|
class UnhideGeneralForumTopic extends Method
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function execute(Bot $bot, array $parameters = []): true
|
||||||
|
{
|
||||||
|
return (bool)(self::executeCurl(self::buildPost($bot, Methods::UNHIDE_GENERAL_FORUM_TOPIC->value, $parameters)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getRequiredParameters(): ?array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'chat_id'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getOptionalParameters(): ?array
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue