Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.34 KB | None | 0 0
  1.  
  2. import discord
  3. import asyncio
  4.  
  5. client = discord.Client()
  6.  
  7. @client.event
  8. async def on_ready():
  9.     print(' ')
  10.     print('DBAN')
  11.     print('YOUR')
  12.     print('FUCKING')
  13.     print('DISCORD')
  14.     print('MESSAGES')
  15.     print('LOSER')
  16.     print('Logged in as:', client.user.name)
  17.     print('UID:',client.user.id)
  18.     print('Discord version:',discord.__version__)
  19.     print('----------')
  20.     print('Connected to:')
  21.     for server in client.servers:
  22.         print(' -',server.name)
  23.  
  24.     user_id = 264901736529920001
  25.     for channel in client.private_channels:
  26.         if commands[1] in str(channel):
  27.             if str(channel.type) == 'private':
  28.                 user_id = str(channel.id)
  29.     async for msg in client.logs_from(discord.Object(id=user_id), limit=9999):
  30.         if msg.author == client.user:
  31.             try:
  32.                 await client.delete_message(msg)
  33.             except Exception as x:
  34.                 pass
  35.  
  36. # Define commands
  37. @client.event
  38. async def on_message(message):
  39.     if message.author == client.user:
  40.         commands = []
  41.         z = 0
  42.         for index, a in enumerate(message.content):
  43.             if a == " ":
  44.                 commands.append(message.content[z:index])
  45.                 z = index+1
  46.         commands.append(message.content[z:])
  47.        
  48.         # MASS DELETE OWN MESSAGES
  49.         if commands[0] == 'xc':
  50.             if len(commands) == 1:
  51.                 async for msg in client.logs_from(message.channel,limit=9999):
  52.                     if msg.author == client.user:  
  53.                         try:
  54.                             await client.delete_message(msg)
  55.                         except Exception as x:
  56.                             pass
  57.             elif len(commands) == 2:
  58.                 user_id = ''
  59.                 for channel in client.private_channels:
  60.                     if commands[1] in str(channel):
  61.                         if str(channel.type) == 'private':
  62.                             user_id = str(channel.id)
  63.                 async for msg in client.logs_from(discord.Object(id=user_id),limit=9999):
  64.                     if msg.author == client.user:
  65.                         try:
  66.                             await client.delete_message(msg)
  67.                         except Exception as x:
  68.                             pass
  69.  
  70. EMAIL = ''
  71. PASS = ''
  72. client.run(EMAIL, PASS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement