Skip to content
Snippets Groups Projects
Commit 780e3ab3 authored by dnns01's avatar dnns01
Browse files

Fixed minor issues

parent 119583da
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ class NewsCog(commands.Cog): ...@@ -10,6 +10,7 @@ class NewsCog(commands.Cog):
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
self.channel_id = int(os.getenv("DISCORD_NEWS_CHANNEL")) self.channel_id = int(os.getenv("DISCORD_NEWS_CHANNEL"))
self.news_role = int(os.getenv("DISCORD_NEWS_ROLE"))
self.url = "https://www.fernuni-hagen.de/mi/studium/aktuelles/index.shtml" self.url = "https://www.fernuni-hagen.de/mi/studium/aktuelles/index.shtml"
self.news = {} self.news = {}
self.load_news() self.load_news()
...@@ -39,7 +40,8 @@ class NewsCog(commands.Cog): ...@@ -39,7 +40,8 @@ class NewsCog(commands.Cog):
if not self.news.get(link): if not self.news.get(link):
self.news[link] = date self.news[link] = date
await channel.send(f":loudspeaker: Neues aus der Fakultät vom {date} :loudspeaker: \n{title} \n{link}") await channel.send(
f":loudspeaker: <@&{self.news_role}> Neues aus der Fakultät vom {date} :loudspeaker: \n{title} \n{link}")
else: else:
prev_date = self.news[link] prev_date = self.news[link]
if date != prev_date: if date != prev_date:
......
...@@ -19,7 +19,7 @@ class PollCog(commands.Cog): ...@@ -19,7 +19,7 @@ class PollCog(commands.Cog):
msg = f"<@!{ctx.author.id}> hat folgende Umfrage vorgeschlagen:\nFrage:{question}\n\nAntwortoptionen:\n" msg = f"<@!{ctx.author.id}> hat folgende Umfrage vorgeschlagen:\nFrage:{question}\n\nAntwortoptionen:\n"
for answer in answers: for answer in answers:
msg += f"{answer}" msg += f"{answer}\n"
await channel.send(msg) await channel.send(msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment