Skip to content

Commit

Permalink
(#33) update setting config for tool bot
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jul 28, 2023
1 parent 34becc1 commit 3000e95
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@
"scripts": {
"post-install-cmd": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
"php -r \"file_exists('storage/tg-event.json') || copy('config/jsons/tg-event.json', 'storage/tg-event.json');\""
"php -r \"file_exists('storage/tg-event.json') || copy('config/jsons/tg-event.json', 'storage/tg-event.json');\"",
"php -r \"file_exists('storage/tg-setting.json') || copy('config/jsons/tg-setting.json', 'storage/tg-setting.json');\""
],
"post-update-cmd": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
"php -r \"file_exists('storage/tg-event.json') || copy('config/jsons/tg-event.json', 'storage/tg-event.json');\""
"php -r \"file_exists('storage/tg-event.json') || copy('config/jsons/tg-event.json', 'storage/tg-event.json');\"",
"php -r \"file_exists('storage/tg-setting.json') || copy('config/jsons/tg-setting.json', 'storage/tg-setting.json');\""
]
}
}
3 changes: 3 additions & 0 deletions config/jsons/tg-setting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enable_full_event": false
}
10 changes: 0 additions & 10 deletions config/jsons/tsconfig.json

This file was deleted.

7 changes: 3 additions & 4 deletions src/Services/TelegramService.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,8 @@ public function checkCallback(): bool
if (!is_null($this->telegram->Callback_ChatID())) {
$callback = $this->telegram->Callback_Data();
$this->sendCallbackResponse($callback);

return true;
}

return false;
}

Expand All @@ -156,8 +154,9 @@ public function helpMarkup(): array
[
$this->telegram->buildInlineKeyBoardButton("📰 About", "", "about", ""),
$this->telegram->buildInlineKeyBoardButton("📞 Contact", config('author.contact'))
],
[$this->telegram->buildInlineKeyBoardButton("💠 Source Code", config('author.source_code'))]
], [
$this->telegram->buildInlineKeyBoardButton("💠 Source Code", config('author.source_code'))
]
];
}
}

0 comments on commit 3000e95

Please sign in to comment.