diff --git a/bot_script.pl b/bot_script.pl new file mode 100644 index 0000000..ed7fc78 --- /dev/null +++ b/bot_script.pl @@ -0,0 +1,26 @@ +#/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;