Skip to content

Commit

Permalink
fix: Disable DMs (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixpereira authored Oct 10, 2024
1 parent 4a27dee commit 9fbecca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ async def help(interaction: Interaction):
# Ignore non-slash commands
@client.event
async def on_message(message: Message):
# Ignore DMs by checking if the message was sent in a server
if message.guild is None:
return

if (
client.user.mentioned_in(message) or "d.chat" in message.clean_content
) and message.author != client.user:
Expand Down

0 comments on commit 9fbecca

Please sign in to comment.