Reputation: 114
I want to make an auto-moderation system, so the Bot will warn members who sent a server invite link. How can I do so? Example code:
@client.event
async def on_message(message):
if message.isInvite():
print("warn")
Upvotes: 1
Views: 91
Reputation: 966
From what i've seen, discord server links start with discord.gg
.
So you could use:
if 'discord.gg' in message:
print('warn')
Upvotes: 1