New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time & weather: fix inconsistency #179
Conversation
- command "ctime" replaced with "settime" - edited strings to match with weather module
- fix broken set country hint message - replace errors with "Invalid country." (won't show details if it's weather provider server side problem) - make every string monospace
Seems fine for me, lint this and I'll merge |
Lint ftw |
@@ -41,16 +41,15 @@ | |||
return | |||
|
|||
if len(OWM_API) < 1: | |||
await weather.edit("Get an API key from " | |||
"https://openweathermap.org/ first.") | |||
await weather.edit("`Get an API key from` https://openweathermap.org/ `first.`") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to even edit this line...
@@ -77,7 +76,7 @@ | |||
result = json.loads(request.text) | |||
|
|||
if request.status_code != 200: | |||
await weather.edit(f"{result['message']}") | |||
await weather.edit(f"`Invalid country.`") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have it there to tell what msg the page give out alongside 200 error.
@@ -139,7 +138,7 @@ def sun(unix): | |||
return | |||
|
|||
if len(OWM_API) < 1: | |||
await city.edit("Get an API key from https://openweathermap.org/ first.") | |||
await city.edit("`Get an API key from` https://openweathermap.org/ `first.`") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint this.
@@ -175,7 +174,7 @@ def sun(unix): | |||
result = json.loads(request.text) | |||
|
|||
if request.status_code != 200: | |||
await city.edit(f"{result['message']}") | |||
await city.edit(f"`Invalid country.`") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have it there to tell what msg the page give out alongside 200 error.
No description provided.