Correction
This commit is contained in:
parent
9817608eb7
commit
59af689364
12 changed files with 17 additions and 12 deletions
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): true
|
||||
{
|
||||
return (bool)$bot->sendRequest(Methods::BAN_CHAT_MEMBER->value, $parameters);
|
||||
return (bool)self::executeCurl(self::buildPost($bot, Methods::BAN_CHAT_MEMBER->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): true
|
||||
{
|
||||
return (bool)$bot->sendRequest(Methods::BAN_CHAT_SENDER_CHAT->value, $parameters);
|
||||
return (bool)self::executeCurl(self::buildPost($bot, Methods::BAN_CHAT_SENDER_CHAT->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): ChatInviteLink
|
||||
{
|
||||
return ChatInviteLink::fromArray($bot->sendRequest(Methods::CREATE_CHAT_INVITE_LINK->value, $parameters));
|
||||
return ChatInviteLink::fromArray(
|
||||
self::executeCurl(self::buildPost($bot, Methods::CREATE_CHAT_INVITE_LINK->value, $parameters))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): ChatInviteLink
|
||||
{
|
||||
return ChatInviteLink::fromArray($bot->sendRequest(Methods::EDIT_CHAT_INVITE_LINK->value, $parameters));
|
||||
return ChatInviteLink::fromArray(
|
||||
self::executeCurl(self::buildPost($bot, Methods::EDIT_CHAT_INVITE_LINK->value, $parameters))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Objects\ChatInviteLink;
|
||||
|
||||
class ExportChatInviteLink extends Method
|
||||
{
|
||||
|
@ -14,7 +15,7 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): string
|
||||
{
|
||||
return $bot->sendRequest(Methods::EXPORT_CHAT_INVITE_LINK->value, $parameters);
|
||||
return (string)self::executeCurl(self::buildPost($bot, Methods::EXPORT_CHAT_INVITE_LINK->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): File
|
||||
{
|
||||
return File::fromArray($bot->sendRequest(Methods::GET_FILE->value, $parameters));
|
||||
return File::fromArray(self::executeCurl(self::buildPost($bot, Methods::GET_FILE->value, $parameters)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): UserProfilePhotos
|
||||
{
|
||||
return UserProfilePhotos::fromArray($bot->sendRequest(Methods::GET_USER_PROFILE_PHOTOS->value, $parameters));
|
||||
return UserProfilePhotos::fromArray(self::executeCurl(self::buildPost($bot, Methods::GET_USER_PROFILE_PHOTOS->value, $parameters)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): true
|
||||
{
|
||||
return (bool)$bot->sendRequest(Methods::PROMOTE_CHAT_MEMBER->value, $parameters);
|
||||
return (bool)self::executeCurl(self::buildPost($bot, Methods::PROMOTE_CHAT_MEMBER->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
$parameters['permissions'] = json_encode($parameters['permissions']);
|
||||
}
|
||||
|
||||
return (bool)$bot->sendRequest(Methods::RESTRICT_CHAT_MEMBER->value, $parameters);
|
||||
return (bool)self::executeCurl(self::buildPost($bot, Methods::RESTRICT_CHAT_MEMBER->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): true
|
||||
{
|
||||
return (bool)$bot->sendRequest(Methods::SET_CHAT_ADMINISTRATOR_CUSTOM_TITLE->value, $parameters);
|
||||
return (bool)self::executeCurl(self::buildPost($bot, Methods::SET_CHAT_ADMINISTRATOR_CUSTOM_TITLE->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
$parameters['permissions'] = json_encode($parameters['permissions']);
|
||||
}
|
||||
|
||||
return (bool)$bot->sendRequest(Methods::SET_CHAT_PERMISSIONS->value, $parameters);
|
||||
return (bool)self::executeCurl(self::buildPost($bot, Methods::SET_CHAT_PERMISSIONS->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): true
|
||||
{
|
||||
return (bool)$bot->sendRequest(Methods::UNBAN_CHAT_SENDER_CHAT->value, $parameters);
|
||||
return (bool)self::executeCurl(self::buildPost($bot, Methods::UNBAN_CHAT_SENDER_CHAT->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue