Issue #1: Bot module now also able to use config file.
This commit is contained in:
parent
00fc8e1d2a
commit
b4a5a915ba
@ -9,6 +9,7 @@ no warnings qw(experimental);
|
|||||||
|
|
||||||
# core packages
|
# core packages
|
||||||
use Encode;
|
use Encode;
|
||||||
|
use FindBin;
|
||||||
|
|
||||||
# CPAN packages
|
# CPAN packages
|
||||||
use JSON;
|
use JSON;
|
||||||
@ -19,7 +20,7 @@ use YAML;
|
|||||||
package F1DataBot;
|
package F1DataBot;
|
||||||
|
|
||||||
# Constants and initalisations
|
# Constants and initalisations
|
||||||
Log::Log4perl->init('log.conf');
|
Log::Log4perl->init("$FindBin::Bin/log.conf");
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ( $Type, %Param ) = @_;
|
my ( $Type, %Param ) = @_;
|
||||||
@ -38,7 +39,7 @@ sub new {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# load remembered update ids
|
# load remembered update ids
|
||||||
$Self->{MessageIDs} = YAML::LoadFile('message_ids.yml');
|
$Self->{MessageIDs} = YAML::LoadFile("$FindBin::Bin/message_ids.yml");
|
||||||
|
|
||||||
return $Self;
|
return $Self;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user