Compare commits
No commits in common. "288409a1c2eae469007d477d17336a57d3a9ab1c" and "0d1a29323c7056a545f6714cc4c5381da65a6fbc" have entirely different histories.
288409a1c2
...
0d1a29323c
@ -9,7 +9,6 @@ no warnings qw(experimental);
|
|||||||
|
|
||||||
# core packages
|
# core packages
|
||||||
use Encode;
|
use Encode;
|
||||||
use FindBin;
|
|
||||||
|
|
||||||
# CPAN packages
|
# CPAN packages
|
||||||
use JSON;
|
use JSON;
|
||||||
@ -20,7 +19,7 @@ use YAML;
|
|||||||
package F1DataBot;
|
package F1DataBot;
|
||||||
|
|
||||||
# Constants and initalisations
|
# Constants and initalisations
|
||||||
Log::Log4perl->init("$FindBin::Bin/log.conf");
|
Log::Log4perl->init('log.conf');
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ( $Type, %Param ) = @_;
|
my ( $Type, %Param ) = @_;
|
||||||
@ -39,7 +38,7 @@ sub new {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# load remembered update ids
|
# load remembered update ids
|
||||||
$Self->{MessageIDs} = YAML::LoadFile("$FindBin::Bin/message_ids.yml");
|
$Self->{MessageIDs} = YAML::LoadFile('message_ids.yml');
|
||||||
|
|
||||||
return $Self;
|
return $Self;
|
||||||
}
|
}
|
||||||
|
@ -5,22 +5,9 @@ use v5.32;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use FindBin;
|
use lib '/home/demiguise/telegram_bot';
|
||||||
use YAML;
|
|
||||||
|
|
||||||
my $Conf;
|
|
||||||
BEGIN { $Conf = YAML::LoadFile("$FindBin::Bin/.f1bot.cnf"); }
|
|
||||||
|
|
||||||
if ( !$Conf->%* ) {
|
|
||||||
print STDERR "No valid config was found. Exiting...\n";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
use lib $Conf->{Lib};
|
|
||||||
|
|
||||||
use F1DataBot;
|
use F1DataBot;
|
||||||
|
|
||||||
my $F1DataBotObject = F1DataBot->new($Conf->%*);
|
my $F1DataBotObject = F1DataBot->new();
|
||||||
$F1DataBotObject->fetchMessages();
|
$F1DataBotObject->fetchMessages();
|
||||||
|
|
||||||
exit;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user