Skip to content

Commit

Permalink
quran bot v6.7.9 just message admins to admins for testing mode
Browse files Browse the repository at this point in the history
  • Loading branch information
saber13812002 committed Sep 4, 2023
1 parent 282bacc commit 830aff9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/Helpers/AdminHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ static function getAdmins(): array
}

public
static function getMessageAdmin(mixed $Text): string
static function getMessageAdmin(mixed $Text, $start = 3): string
{
return Str::substr($Text, 3, Str::length($Text));
return Str::substr($Text, $start, Str::length($Text));
}

}
6 changes: 5 additions & 1 deletion app/Http/Controllers/QuranWordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,11 @@ function messageToAll(BotRequest $request)
if (AdminHelper::isAdminCommand($bot->Text())) {
if (AdminHelper::isAdmin($bot->ChatID())) {

$message = AdminHelper::getMessageAdmin($bot->Text());
if ($request->request->get('to_admins') == "false") {
$message = AdminHelper::getMessageAdmin($bot->Text());
} else {
$message = AdminHelper::getMessageAdmin($bot->Text(), 4);
}

$botBale = new Telegram(env('QURAN_HEFZ_BOT_TOKEN_BALE'), 'bale');
$botTelegram = new Telegram(env('QURAN_HEFZ_BOT_TOKEN_TELEGRAM'), 'telegram');
Expand Down

0 comments on commit 830aff9

Please sign in to comment.