Advertisement
AeroTools

Untitled

Dec 6th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.07 KB | None | 0 0
  1. #!/usr/bin/env python3.6
  2. import discord
  3. from sys import argv
  4. from time import sleep
  5.    
  6.  
  7.  
  8. try:
  9.     idd = 632649478288965703 # for testing
  10.     typ = 1 # for testing
  11.  
  12.     #idd = int(argv[1])
  13.     #typ = len(argv[2])
  14. except:
  15.     print("{Script Error}")
  16.     exit(0)
  17.  
  18. client=discord.Client()
  19. @client.event
  20. async def on_ready():
  21.     global idd, typ
  22.     cont = True
  23.     this = {}
  24.     if typ == 2:
  25.         try:
  26.             this['id'] = idd
  27.             member = client.get_user(idd)
  28.         except:
  29.             print('{"response":"User not found!"}')
  30.             cont = False
  31.            
  32.         if cont == True:
  33.             try:
  34.                 this['name'] = member.name
  35.                 this['discriminator'] = member.discriminator
  36.                 start_date = str(discord.utils.snowflake_time(idd))
  37.                 this['discord_start_date_day'] = start_date.split(" ")[0]
  38.                 this['discord_start_date_time_utc'] = start_date.split(" ")[1]
  39.                 this['is_blocking_unverifieds'] = str(member.is_blocked())
  40.                 this['is_bot'] = str(member.bot)
  41.                 this['avatar_hash'] = str(member.avatar)
  42.            
  43.             except Exception as e:
  44.                 print("""{"response**":"ScriptError: """+str(e)+""""}""")
  45.                 cont = False
  46.                 exit(0)
  47.  
  48.             if cont == True:
  49.                 print(str(this))
  50.                
  51.             sleep(.1)
  52.             exit(0)
  53.  
  54.  
  55.  
  56.     if typ == 1:
  57.         this['id'] = idd
  58.         try:
  59.             server = client.get_guild(idd)
  60.         except Exception as EEE:
  61.             print(f'{"response":"Error! Guild not found!", "error":"{str(EEE)}"}')
  62.             cont = False
  63.             exit(0)
  64.            
  65.         if server.name == None:
  66.             print(f'{"response":"Guild not found!"}')
  67.             cont = False
  68.             exit(0)
  69.            
  70.            
  71.         if cont == True:
  72.             try:
  73.                 this['name'] = str(server.name)
  74.                 this['owner_id'] = str(server.owner_id)
  75.                 this['owner'] = str(server.owner)                
  76.                 start_date = str(discord.utils.snowflake_time(int(idd)))
  77.                 this['creation_date_day'] = start_date.split(" ")[0]
  78.                 this['creation_date_time_utc'] = start_date.split(" ")[1]
  79.                 this['region'] = str(server.region)
  80.                 this['icon'] = str(server.icon)
  81.                 this['icon_url'] = str(server.icon_url)
  82.                 this['banner_url'] = str(server.banner_url)
  83.                 this['splash_url'] = str(server.splash_url)
  84.                 this['banner'] = str(server.banner)
  85.                 this['description'] = server.description                
  86.                 this['boosters'] = str(server.premium_subscribers)
  87.                 this['is_unavailable'] = str(server.unavailable)
  88.                 this['current_rp_count'] = str(server.max_presences)
  89.                 this['afk_timeout'] = str(server.afk_timeout)
  90.                 this['member_count'] = str(server.member_count)
  91.                 this['mfa_level'] = str(server.mfa_level)
  92.                 this['verification_level'] = str(serververification_level)
  93.                 this['explicit_content_filter'] = str(server.explicit_content_filter)
  94.                 this['default_notifications'] = str(server.default_notifications)
  95.                 this['splash'] = str(server.splash)
  96.                 this['premium_tier'] = str(server.premium_tier)
  97.                 this['premium_subscription_count'] = str(server.verification_level)
  98.                 this['preferred_locale'] = str(server.preferred_locale)
  99.                 this['is_large'] = str(server.large)
  100.                 this['system_channel'] = str(server.system_channel)
  101.                 this['system_channel_flags'] = str(server.system_channel_flags)
  102.                 this['emoji_limit'] = str(server.emoji_limit)
  103.                 this['bitrate_limit'] = str(server.bitrate_limit)
  104.                 this['filesize_limit'] = str(server.filesize_limit)
  105.                 this['is_chunked'] = str(server.chunked)
  106.                 this['created_at_utc'] = str(server.created_at)
  107.                 this['roles'] = str(server.roles)
  108.                 this['voice_client'] = str(server.voice_client)
  109.                 this['categories'] = str(server.categories)
  110.                 this['text_channels'] = str(server.text_channels)
  111.                 this['voice_channels'] = str(server.voice_channels)
  112.                 this['all_channels'] = str(server.channels)
  113.                 this['features'] = str(server.features)
  114.                 this['members'] = str(server.members)
  115.                 this['emojis'] = str(server.emojis)
  116.                
  117.            
  118.             except Exception as e:
  119.                 print("""{"response*":"ScriptError: """+str(e)+""""}""")
  120.                 cont = False
  121.  
  122.             if cont == True:
  123.                 print(str(this))
  124.                
  125.     sleep(.1)
  126.     exit(0)    
  127.  
  128.                    
  129. try:
  130.     client.run("token")  
  131. except Exception as fuk:
  132.     print('{'+'"fatal_error":'+f'"{fuk}"'+'}')
  133.     sleep(.1)
  134.     exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement