aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/python_news.py (renamed from bot/cogs/news.py)6
1 files changed, 2 insertions, 4 deletions
diff --git a/bot/cogs/news.py b/bot/cogs/python_news.py
index fc79f2fdc..57ce61638 100644
--- a/bot/cogs/news.py
+++ b/bot/cogs/python_news.py
@@ -23,14 +23,13 @@ AVATAR_URL = "https://www.python.org/static/opengraph-icon-200x200.png"
log = logging.getLogger(__name__)
-class News(Cog):
+class PythonNews(Cog):
"""Post new PEPs and Python News to `#python-news`."""
def __init__(self, bot: Bot):
self.bot = bot
self.webhook_names = {}
self.webhook: t.Optional[discord.Webhook] = None
- self.channel: t.Optional[discord.TextChannel] = None
self.bot.loop.create_task(self.get_webhook_names())
self.bot.loop.create_task(self.get_webhook_and_channel())
@@ -222,7 +221,6 @@ class News(Cog):
"""Storage #python-news channel Webhook and `TextChannel` to `News.webhook` and `channel`."""
await self.bot.wait_until_guild_available()
self.webhook = await self.bot.fetch_webhook(constants.PythonNews.webhook)
- self.channel = await self.bot.fetch_channel(constants.PythonNews.channel)
await self.start_tasks()
@@ -233,4 +231,4 @@ class News(Cog):
def setup(bot: Bot) -> None:
"""Add `News` cog."""
- bot.add_cog(News(bot))
+ bot.add_cog(PythonNews(bot))