Skip to content

Commit c7dcac7

Browse files
authored
Merge pull request #42 from noplanman/link_to_bot_rules
Encourage users to use the bot...
2 parents d68e300 + 022671c commit c7dcac7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

commands/NewchatmembersCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private function refreshWelcomeMessage(array $new_users): ServerResponse
9696

9797
$text = "Welcome {$new_users_text} to the <b>{$this->group_name}</b> group\n";
9898
$text .= 'Please remember that this is <b>NOT</b> the Telegram Support Chat.' . PHP_EOL;
99-
$text .= 'Read the <a href="https://t.me/PHP_Telegram_Bot_Support/5526">Rules</a> that apply here.';
99+
$text .= 'Read the <a href="https://t.me/PHP_Telegram_Support_Bot?start=rules">Rules</a> that apply here.';
100100

101101
$welcome_message_sent = $this->replyToChat($text, ['parse_mode' => 'HTML', 'disable_web_page_preview' => true]);
102102
if (!$welcome_message_sent->isOk()) {

commands/StartCommand.php

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ class StartCommand extends SystemCommand
5353
*/
5454
public function execute(): ServerResponse
5555
{
56+
if ('rules' === $this->getMessage()->getText(true)) {
57+
return $this->getTelegram()->executeCommand('rules');
58+
}
59+
5660
return $this->getTelegram()->executeCommand('help');
5761
}
5862
}

0 commit comments

Comments
 (0)