Create dislog.py

main
witchdocsec 2024-04-04 19:03:34 +01:00 committed by GitHub
parent fd067cddb0
commit c03af39562
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 26 additions and 0 deletions

26
dislog.py Normal file
View File

@ -0,0 +1,26 @@
import discord
import sys
class MyClient(discord.Client):
async def on_ready(self):
print(f'Online as {self.user}')
async def on_message_delete(self,message):
print("message deleted")
print(f"{message.author}-({message.channel}):{message.content}")
if sys.argv[2]=="all":
async def on_message(self,message):
print("message created")
print(f"{message.author}-({message.channel}):{message.content}")
intents = discord.Intents.default()
intents.message_content = True
client = MyClient(intents=intents)
print(''' _____ _ _
| __ \\(_) | |
| | | |_ ___| | ___ __ _ _ __ _ _
| | | | / __| |/ _ \\ / _` | | '_ \\| | | |
| |__| | \\__ \\ | (_) | (_| |_| |_) | |_| |
|_____/|_|___/_|\\___/ \\__, (_) .__/ \\__, |
__/ | | | __/ |
|___/ |_| |___/''')
client.run(sys.argv[1])