diff options
| author | 2019-03-30 18:11:15 +1000 | |
|---|---|---|
| committer | 2019-03-30 18:11:15 +1000 | |
| commit | 51d36c768e8c6338f02f1275b58b811928d18f82 (patch) | |
| tree | c2bcb13a89492b7e198fc2aff552d102909506c1 | |
| parent | Always announce if docstring, better formatting. (diff) | |
Add season icon as announcement image.
| -rw-r--r-- | bot/seasons/season.py | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/bot/seasons/season.py b/bot/seasons/season.py index c78de981..cfc27172 100644 --- a/bot/seasons/season.py +++ b/bot/seasons/season.py @@ -17,6 +17,8 @@ from bot.decorators import with_role  log = logging.getLogger(__name__) +ICON_BASE_URL = "https://raw.githubusercontent.com/python-discord/branding/master" +  def get_seasons() -> List[str]:      """ @@ -163,12 +165,11 @@ class SeasonBase:          `https://raw.githubusercontent.com/python-discord/branding/master`          """ -        base_url = "https://raw.githubusercontent.com/python-discord/branding/master"          if avatar:              icon = self.bot_icon or self.icon          else:              icon = self.icon -        full_url = base_url + icon +        full_url = ICON_BASE_URL + icon          log.debug(f"Getting icon from: {full_url}")          async with bot.http_session.get(full_url) as resp:              return await resp.read() @@ -289,6 +290,9 @@ class SeasonBase:          embed = discord.Embed(description=f"{announce}\n\n", colour=self.colour or guild.me.colour)          embed.set_author(name=self.greeting) +        if self.icon: +            embed.set_image(url=ICON_BASE_URL+self.icon) +          # find any seasonal commands          cogs = []          for cog in bot.cogs.values(): | 
