diff options
| author | 2020-03-31 18:10:17 +0200 | |
|---|---|---|
| committer | 2020-03-31 18:10:17 +0200 | |
| commit | 466ce98a8daede6258a056748f3ed7b4b9766ceb (patch) | |
| tree | da4ea2fd0ac8186f49a5731e268db031f67767eb | |
| parent | Deseasonify: `pop` from remaining icons rather than unpack (diff) | |
Deseasonify: turn helpers into regular functions
It is not necessary for these to be coroutines.
Co-authored-by: MarkKoz <[email protected]>
| -rw-r--r-- | bot/exts/evergreen/branding.py | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/bot/exts/evergreen/branding.py b/bot/exts/evergreen/branding.py index 421aeef7..9761811a 100644 --- a/bot/exts/evergreen/branding.py +++ b/bot/exts/evergreen/branding.py @@ -52,12 +52,12 @@ class GitHubFile(t.NamedTuple):      sha: str -async def pretty_files(files: t.Iterable[GitHubFile]) -> str: +def pretty_files(files: t.Iterable[GitHubFile]) -> str:      """Provide a human-friendly representation of `files`."""      return "\n".join(file.path for file in files) -async def time_until_midnight() -> timedelta: +def time_until_midnight() -> timedelta:      """      Determine amount of time until the next-up UTC midnight. @@ -210,7 +210,7 @@ class BrandingManager(commands.Cog):              elif next(self.should_cycle):                  await self.cycle() -            until_midnight = await time_until_midnight() +            until_midnight = time_until_midnight()              await asyncio.sleep(until_midnight.total_seconds())      async def _info_embed(self) -> discord.Embed: @@ -233,7 +233,7 @@ class BrandingManager(commands.Cog):          avatar = self.avatar.path if self.avatar is not None else "Unavailable"          info_embed.add_field(name="Avatar", value=avatar, inline=False) -        icons = await pretty_files(self.available_icons) or "Unavailable" +        icons = pretty_files(self.available_icons) or "Unavailable"          info_embed.add_field(name="Available icons", value=icons, inline=False)          # Only display cycle frequency if we're actually cycling @@ -508,7 +508,7 @@ class BrandingManager(commands.Cog):      async def daemon_status(self, ctx: commands.Context) -> None:          """Check whether daemon is currently active."""          if self._daemon_running: -            remaining_time = (arrow.utcnow() + await time_until_midnight()).humanize() +            remaining_time = (arrow.utcnow() + time_until_midnight()).humanize()              response = discord.Embed(description=f"Daemon running {Emojis.ok_hand}", colour=Colours.soft_green)              response.set_footer(text=f"Next refresh {remaining_time}")          else: | 
