Skip to content

Commit 731e3cd

Browse files
committed
Add comment regarding configuration options and update changelog.
1 parent 4cbce0d commit 731e3cd

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
77
### Added
88
- Callbacks can be added to be executed when callback queries are called.
99
- New Bot API 3.1 changes (#550).
10+
- `/cleanup` command for admins, that cleans out old entries from the DB.
1011
### Changed
1112
- [:exclamation:][unreleased-bc-request-class-refactor] Big refactor of the `Request` class, removing most custom method implementations.
1213
### Deprecated

src/Commands/AdminCommands/CleanupCommand.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@
1919

2020
/**
2121
* User "/cleanup" command
22+
*
23+
* Configuration options:
24+
*
25+
* $telegram->setCommandConfig('cleanup', [
26+
* // Define which tables should be cleaned.
27+
* 'tables_to_clean' => [
28+
* 'message',
29+
* 'edited_message',
30+
* ],
31+
* // Define how old cleaned entries should be.
32+
* 'clean_older_than' => [
33+
* 'message' => '7 days',
34+
* 'edited_message' => '30 days',
35+
* ]
36+
* );
2237
*/
2338
class CleanupCommand extends AdminCommand
2439
{

0 commit comments

Comments
 (0)