diff options
| author | 2020-09-10 09:06:37 -0700 | |
|---|---|---|
| committer | 2020-09-10 09:06:37 -0700 | |
| commit | ffdb4ac4a80e4f1579ba1ea26547e206c18ff646 (patch) | |
| tree | 411079d018b61f79e332ae7afaa35325ccfe55ad /bot/exts | |
| parent | Renamed "esoteric-Python" to "esoteric-python" (diff) | |
Updated conversationstarters to simplify what values need to be checked.
Diffstat (limited to 'bot/exts')
| -rw-r--r-- | bot/exts/evergreen/conversationstarters.py | 11 | 
1 files changed, 4 insertions, 7 deletions
diff --git a/bot/exts/evergreen/conversationstarters.py b/bot/exts/evergreen/conversationstarters.py index beda8479..1912d1af 100644 --- a/bot/exts/evergreen/conversationstarters.py +++ b/bot/exts/evergreen/conversationstarters.py @@ -27,7 +27,7 @@ with Path("bot/resources/evergreen/py_topics.yaml").open("r", encoding="utf8") a  ALL_TOPICS = {'default': STARTERS, **PY_TOPICS}  TOPICS = {      channel: RandomCycle(topics or ['No topics found for this channel.']) -    for channel, topics in all_topics.items() +    for channel, topics in ALL_TOPICS.items()  } @@ -60,13 +60,10 @@ class ConvoStarters(commands.Cog):          # If the channel ID doesn't have any topics.          else: -            if channel_topics: -                embed.title = f'**{next(channel_topics)}**' +            embed.title = f'**{next(channel_topics)}**' -            else: -                embed.title = 'No topics found for this channel.' - -        await ctx.send(embed=embed) +        finally: +            await ctx.send(embed=embed)  def setup(bot: commands.Bot) -> None:  |