Skip to content

Commit a833664

Browse files
committed
fix for env data
1 parent e997f3e commit a833664

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/services/load_env.util.dart

+8-4
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,17 @@ class AtBotEnv {
5656
_clientID = env['botID']!.toSnowflake();
5757
}
5858
} else {
59-
/// If the file is not found, throw FileSystemException.
60-
// throw const FileSystemException();
61-
BotLogger.logln(LogType.error, 'Missing `.env` file');
59+
// /// If the file is not found, throw FileSystemException.
60+
// // throw const FileSystemException();
61+
BotLogger.logln(
62+
LogType.error, 'Missing `.env` file | Fetching from env');
63+
_prefix = Platform.environment['prefix'];
64+
_token = Platform.environment['token'];
65+
_clientID = Platform.environment['botID']!.toSnowflake();
6266
}
6367
} on FileSystemException catch (_) {
6468
/// Throw an exception if the file is not found.
65-
BotLogger.logln(LogType.error, 'Missing `.env` file');
69+
BotLogger.logln(LogType.error, 'Missing `.env` file | Fetching from env');
6670
_prefix = Platform.environment['prefix'];
6771
_token = Platform.environment['token'];
6872
_clientID = Platform.environment['botID']!.toSnowflake();

0 commit comments

Comments
 (0)