Skip to content

Commit 3697a98

Browse files
committed
fix(util): time and weather improperly imported geopy.extra.rate_limiter
1 parent 262f7eb commit 3697a98

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,7 @@ Made the maintainer only command reload_exts reload the config.
5353
As I started using ruff and uv here, I also formatted everything and addressed the hundreds and hundreds of errors ruff so joyfully raised.
5454

5555
#### 1.6.1
56-
Fixes various bugs introduced in 1.6.0, and also see #24.
56+
Fixes various bugs introduced in 1.6.0, and also see #24.
57+
58+
#### 1.6.2
59+
Time and weather commands were broken because of some importing issues.

takina/cogs/util/time.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import tzfpy
88
import config
99
from nextcord.ext import commands
10-
import geopy.extra
10+
from geopy.extra import rate_limiter
1111

1212

1313
async def find_time(location: str):
@@ -19,7 +19,7 @@ async def find_time(location: str):
1919
async with geopy.geocoders.Nominatim(
2020
user_agent=config.BOT_NAME, adapter_factory=geopy.adapters.AioHTTPAdapter
2121
) as geolocator:
22-
geocode = geopy.extra.rate_limiter.AsyncRateLimiter(
22+
geocode = rate_limiter.AsyncRateLimiter(
2323
geolocator.geocode, min_delay_seconds=1
2424
)
2525
location_data = await geocode(location)

takina/cogs/util/weather.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import config
66
from nextcord.ext import commands
77
from open_meteo import OpenMeteo
8-
import geopy.extra
8+
from geopy.extra import rate_limiter
99

1010

1111
async def find_weather(location: str):
@@ -17,7 +17,7 @@ async def find_weather(location: str):
1717
async with geopy.geocoders.Nominatim(
1818
user_agent=config.BOT_NAME, adapter_factory=geopy.adapters.AioHTTPAdapter
1919
) as geolocator:
20-
geocode = geopy.extra.rate_limiter.AsyncRateLimiter(
20+
geocode = rate_limiter.AsyncRateLimiter(
2121
geolocator.geocode, min_delay_seconds=1
2222
)
2323
location_data = await geocode(location)

takina/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
REDDIT_CLIENT_ID = getenv("REDDIT_CLIENT_ID")
1414
REDDIT_CLIENT_SECRET = getenv("REDDIT_CLIENT_SECRET")
1515
ERROR_COLOR = 0xFF0037
16-
BOT_VERSION = "1.6.1"
16+
BOT_VERSION = "1.6.2"
1717

1818
EMBED_COLOR_STR = getenv("EMBED_COLOR", "#2B2D31")
1919
if EMBED_COLOR_STR.startswith("#"):

0 commit comments

Comments
 (0)