Skip to content
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

Merged
merged 2 commits into from Aug 26, 2019
Merged

time & weather: fix inconsistency #179

merged 2 commits into from Aug 26, 2019

Conversation

hugwalk
Copy link
Contributor

@hugwalk hugwalk commented Aug 24, 2019

No description provided.

- 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
@raphielscape
Copy link
Member

Seems fine for me, lint this and I'll merge

@RealAkito
Copy link
Member

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.`")
Copy link
Member

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.`")
Copy link
Member

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.`")
Copy link
Member

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.`")
Copy link
Member

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.

@baalajimaestro baalajimaestro merged commit f25949d into RaphielGang:staging Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants