Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
Added functionality to print your WFO configuration to the console on startup, and fixed a typo in the README
  • Loading branch information
Sanel K committed Aug 23, 2021
1 parent cfd3177 commit 5575457
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Once you have obtained your credentials, you need to create a `.json` file that
}
```

**If you wish to receive messages from all WFOs, put the word "all" in your `wfo_offices` configuration, such that it looks like this:**
**If you wish to receive messages from all WFOs, put the word "every" in your `wfo_offices` configuration, such that it looks like this:**
```json
"wfo_offices": [
"every"
Expand Down
7 changes: 7 additions & 0 deletions oibot.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,13 @@ def _asyncio_task_handler(task: asyncio.Task) -> None:
new_webhook_url = "https://" + discord_webhook_parts[2] + "/" + discord_webhook_parts[3] + "/" + discord_webhook_parts[4] + "/" + discord_webhook_parts[5] + "/" + discord_webhook_parts[6]
print("\t:: Discord webhook URL = "+new_webhook_url)

# Print the list of WFOs that the user has configured to receive messages from
configured_wfos = config['wfo_offices']
wfo_list = ""
for wfo in configured_wfos:
wfo_list += wfo.upper() + ", "
print("\t:: Configured WFO offices: "+wfo_list)

# Check if we're on Windows 10 and if the user chose to enable the toast notifications feature
if sys.platform == "win32":
print("\t:: Enable Windows 10 Notifications API? "+str(config['enable_win10_notifications']) + "\n")
Expand Down

0 comments on commit 5575457

Please sign in to comment.