Переглянути джерело

fixed coroutines not being awaited

master
Haku 4 роки тому
джерело
коміт
99d76f5bc2
1 змінених файлів з 3 додано та 3 видалено
  1. +3
    -3
      founderlessnotify/founderlessnotify.py

+ 3
- 3
founderlessnotify/founderlessnotify.py Переглянути файл

@@ -136,7 +136,7 @@ class FounderlessNotify(commands.Cog):
minor_time = major_time + 12
# Major Update
if current_time.hour == (major_time + 2):
download_region_dump()
await download_region_dump()
await self.update_founderless('major')
await asyncio.sleep(3600)
# Minor Update
@@ -176,7 +176,7 @@ class FounderlessNotify(commands.Cog):
@checks.is_owner()
async def force_update_founderless(self, ctx):
"""Manually update the founderless region list."""
founderless_regions = get_founderless_regions()
founderless_regions = await get_founderless_regions()
await self.config.previous_founderless.set(founderless_regions)
await ctx.send(f'Manually updated founderless regions list. There are now '
f'{len(founderless_regions)} founderless regions.')
@@ -193,5 +193,5 @@ class FounderlessNotify(commands.Cog):
async def force_download_dump(self, ctx):
"""Manually download the region dump."""
await ctx.send('Downloading region dump...')
download_region_dump()
await download_region_dump()
await ctx.send('Region dump successfully updated.')

Завантаження…
Відмінити
Зберегти