forked from TalonM4/brightid-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
35 lines (29 loc) · 1.31 KB
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import discord
intents = discord.Intents.all()
client = discord.Client(intents=intents)
m = None
channel = None
@client.event
async def on_ready():
global channel
global m
print("Ready")
guild = discord.utils.get(client.guilds, id=596752664906432522)
channel = discord.utils.get(guild.channels, id=759136917668364308)
messages = await channel.history(limit=50).flatten()
for message in messages:
if message.content == "Using the verify command does not verify you. Check <#759203398213566506> to learn how to get verified":
await message.delete()
m = await channel.send(
"Using the verify command does not verify you. Check <#759203398213566506> to learn how to get verified")
@client.event
async def on_message(message):
global m
global channel
if message.channel.id == 759136917668364308:
if message.content != "Using the verify command does not verify you. Check <#759203398213566506> to learn how to get verified":
if message.author.id != 933478527469236234: # this might need to change based on the bot token
await m.delete()
m = await channel.send(
"Using the verify command does not verify you. Check <#759203398213566506> to learn how to get verified")
client.run(os.environ["bot"])