projects
/
SonOfLokstallBot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1232799
)
Add command to get chatid
author
Cameron Ball
<cameron@cameron1729.xyz>
Sun, 18 Nov 2018 04:43:40 +0000
(12:43 +0800)
committer
Cameron Ball
<cameron@cameron1729.xyz>
Sun, 18 Nov 2018 04:43:40 +0000
(12:43 +0800)
purjolok.php
patch
|
blob
|
history
diff --git
a/purjolok.php
b/purjolok.php
index
69e22d4
..
21eb7b5
100644
(file)
--- a/
purjolok.php
+++ b/
purjolok.php
@@
-16,6
+16,19
@@
use Telegram\Bot\Commands\Command;
getTelegram()->addCommand(
new class extends Command {
+ protected $name = 'chatid';
+ protected $description = 'Get the id for this chat.';
+
+ public function handle($arguments) {
+ $this->replyWithMessage([
+ 'text' => $this->getUpdate()->get('message')->get('chat')->get('id')
+ ]);
+ }
+ }
+);
+
+getTelegram()->addCommand(
+ new class extends Command {
protected $name = 'mybills';
protected $description = 'List my bills';