37 lines
932 B
Python
37 lines
932 B
Python
|
|
from botvariables import token
|
||
|
|
|
||
|
|
import discord
|
||
|
|
|
||
|
|
intents = discord.Intents.default()
|
||
|
|
intents.message_content = True
|
||
|
|
intents.moderation = True
|
||
|
|
|
||
|
|
client = discord.Client(intents=intents)
|
||
|
|
|
||
|
|
mention_list = []
|
||
|
|
|
||
|
|
@client.event
|
||
|
|
async def on_ready():
|
||
|
|
print(f'Logged in as {client.user}')
|
||
|
|
|
||
|
|
@client.event
|
||
|
|
async def on_message(message):
|
||
|
|
if message.author == client.user:
|
||
|
|
return
|
||
|
|
|
||
|
|
if message.content.startswith('hotel'):
|
||
|
|
await message.channel.send('trivago')
|
||
|
|
|
||
|
|
if "@" in message.content:
|
||
|
|
if message.author in mention_list:
|
||
|
|
await message.delete()
|
||
|
|
await message.channel.send(f"@{message.author}, you've been restricted from mentions")
|
||
|
|
|
||
|
|
elif message.content.count("@") > 3:
|
||
|
|
await message.delete()
|
||
|
|
await message.channel.send("Whoa, take it easy pal, no more than 3 mentions!")
|
||
|
|
mention_list.append(message.author)
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
client.run(token)
|