File tree 1 file changed +4
-6
lines changed 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,6 @@ class AtBotEnv {
26
26
/// If the file is not found, it will throw an exception.
27
27
Future <void > _loadEnv () async {
28
28
try {
29
- BotLogger .log (LogType .info, Platform .environment['prefix' ]);
30
-
31
29
/// Check if file exist in the current working directory.
32
30
if (File (BotConstants .envFile).existsSync ()) {
33
31
/// Load the env variables from the file.
@@ -64,10 +62,10 @@ class AtBotEnv {
64
62
}
65
63
} on FileSystemException catch (_) {
66
64
/// Throw an exception if the file is not found.
67
- throw FileSystemException (
68
- 'File `${ BotConstants . envFile }` not found.' ,
69
- Directory .current.path,
70
- );
65
+ BotLogger . logln ( LogType .error, 'Missing `.env` file' );
66
+ _prefix = Platform .environment[ 'prefix' ];
67
+ _token = Platform .environment[ 'token' ];
68
+ _clientID = Platform .environment[ 'botID' ] ! . toSnowflake ( );
71
69
} catch (e) {
72
70
throw Exception ('Exception : $e ' );
73
71
}
You can’t perform that action at this time.
0 commit comments