aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtgserver4
1 files changed, 2 insertions, 2 deletions
diff --git a/tgserver b/tgserver
index 91283ba..ed58e46 100755
--- a/tgserver
+++ b/tgserver
@@ -36,7 +36,7 @@ $TOKEN ||= fetch_token() or
-verbose => 99, -sections => "AUTHENTICATION");
while (1) {
- open(my $recv, "-|", "$FindBin::Bin/tgrecv --auto-offset --timeout 100000");
+ open(my $recv, "-|", "$FindBin::Bin/tgrecv --token $TOKEN --auto-offset --timeout 100000");
foreach my $update (@{decode_json <$recv>}) {
$logger->debug(sprintf "Update %s", Dumper($update));
my $text = $update->{'message'}{'text'};
@@ -53,7 +53,7 @@ while (1) {
close($progr);
if ($response) {
- open(my $send, "|-", "$FindBin::Bin/tgsend $chatid");
+ open(my $send, "|-", "$FindBin::Bin/tgsend --token $TOKEN $chatid");
print $send $response;
close($send);
} else {