diff options
| author | 2020-09-24 18:54:10 +0300 | |
|---|---|---|
| committer | 2020-09-24 18:54:10 +0300 | |
| commit | 69d2292ec4b3fb2dc83f291ef1ed7bc86eabfd09 (patch) | |
| tree | b0c3c0991eef3fc278a0977baf129a7205ff469c /bot/exts/halloween/monstersurvey.py | |
| parent | Merge remote-tracking branch 'origin/tic-tac-toe' into tic-tac-toe (diff) | |
| parent | Merge pull request #456 from Anubhav1603/update_dpy (diff) | |
Merge branch 'master' into tic-tac-toe
Diffstat (limited to 'bot/exts/halloween/monstersurvey.py')
| -rw-r--r-- | bot/exts/halloween/monstersurvey.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/halloween/monstersurvey.py b/bot/exts/halloween/monstersurvey.py index 27da79b6..7b1a1e84 100644 --- a/bot/exts/halloween/monstersurvey.py +++ b/bot/exts/halloween/monstersurvey.py @@ -27,13 +27,13 @@ class MonsterSurvey(Cog): """Initializes values for the bot to use within the voting commands.""" self.bot = bot self.registry_location = os.path.join(os.getcwd(), 'bot', 'resources', 'halloween', 'monstersurvey.json') - with open(self.registry_location, 'r') as jason: + with open(self.registry_location, 'r', encoding="utf8") as jason: self.voter_registry = json.load(jason) def json_write(self) -> None: """Write voting results to a local JSON file.""" log.info("Saved Monster Survey Results") - with open(self.registry_location, 'w') as jason: + with open(self.registry_location, 'w', encoding="utf8") as jason: json.dump(self.voter_registry, jason, indent=2) def cast_vote(self, id: int, monster: str) -> None: |