27 lines
365 B
Perl
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;
|