Brett 2025-07-09 02:10:11 -04:00
parent c99b4dbd4a
commit c050d2e45b
1 changed files with 7 additions and 4 deletions

View File

@ -328,11 +328,10 @@ async def on_message(message: discord.Message) -> None:
if message.author == bot.user:
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.startswith("!"):
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.")