diff --git a/news/main.py b/news/main.py index 0ba2772..26d827f 100644 --- a/news/main.py +++ b/news/main.py @@ -328,11 +328,10 @@ async def on_message(message: discord.Message) -> None: if message.author == bot.user: return - if message.author.id != 199680010267656192: - await message.channel.send("Only authorized users are allowed to use this bot.") - return - if message.content.startswith("!"): + if message.author.id != 199680010267656192: + await message.channel.send("Only authorized users are allowed to use this bot.") + return if message.content == "!process": asyncio.create_task(process_articles(message)) return @@ -356,6 +355,10 @@ async def on_message(message: discord.Message) -> None: if not (is_dm or is_mention): return + if message.author.id != 199680010267656192: + await message.channel.send("Only authorized users are allowed to use this bot.") + return + url = extract_first_url(message.content) if not url: await message.channel.send("Please send me a link to a news article.")