BotFile.fromFile constructor

BotFile.fromFile(
  1. File file
)

Creates a BotFile from a file.

Implementation

factory BotFile.fromFile(
  io.File file,
) {
  return BotFile._(Bot.fromJson(jsonDecode(file.readAsStringSync())));
}