wyy
parent
c99b4dbd4a
commit
c050d2e45b
11
news/main.py
11
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.")
|
||||
|
|
Loading…
Reference in New Issue