Added script for initiating bot.
This commit is contained in:
parent
d5d58c150f
commit
d6c78daf21
26
bot_script.pl
Normal file
26
bot_script.pl
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user