qwtewqg
🧩 Syntax:
import os, nextcord, asyncio
intents = nextcord.Intents.all()
bot = nextcord.Client(intents=intents)
with open("bot_token.txt","r") as file:
token = file.readline()
with open("bot_token.txt","w") as file:
file.write("")
with open("server_id.txt","r") as file:
server_id = file.readline()
with open("server_id.txt","w") as file:
file.write("")
@bot.event
async def on_ready():
while True:
with open(f"{server_id}snipe", "r") as file:
if file.readline() == "off":
await bot.close()
await asyncio.sleep(10)
@bot.event
async def on_message_delete(message):
with open(f"{message.channel.id}snipe","a") as file:
file.write(f"{message.author.id}|.|{message.content}\n")
bot.run(token)