TelegramBot/bot_script.pl
2023-11-12 18:12:26 +01:00

27 lines
365 B
Perl

#/usr/bin/perl
use v5.32;
use strict;
use warnings;
use FindBin;
use YAML;
my $Conf;
BEGIN { $Conf = YAML::LoadFile("$FindBin::Bin/.bot.cnf"); }
if ( !$Conf->%* ) {
print STDERR "No valid config was found. Exiting...\n";
exit;
}
use lib $Conf->{Lib};
use TelegramBot;
my $BotObject = TelegramBot->new($Conf->%*);
$BotObject->fetchMessages();
exit;