Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.94 KB | None | 0 0
  1. # Darkziken's bot made by Darkziken
  2.  
  3. import discord
  4. from discord.ext import commands
  5. from discord.ext.commands import Bot
  6. import asyncio
  7. import chalk
  8. import random
  9. import youtube_dl
  10.  
  11. bot = commands.Bot(command_prefix = ':')
  12. bot.remove_command('help')
  13.  
  14. players = {}
  15.  
  16.  
  17. @bot.event
  18. async def on_message(message):
  19. channel = message.channel
  20. if message.content.startswith("Hi"):
  21. await bot.send_message(channel, "Hey There")
  22. await bot.say(message.author.mention)
  23. await bot.process_commands(message)
  24.  
  25. @bot.event
  26. async def on_member_join(member):
  27. await bot.say("{} have joined here".format(userName)
  28.  
  29. @bot.command(pass_context=True)
  30. async def warn(ctx, user: discord.Member):
  31. await bot.say("Don't do that again, @{}. You have been warned".format(user.name))
  32. return await bot.warn(user)
  33.  
  34. @bot.command(pass_context=True)
  35. async def say(ctx, *args):
  36. mesg = ' '.join(args)
  37. await bot.delete_message(ctx.message)
  38. return await bot.say(mesg)
  39.  
  40. @bot.command(pass_context=True)
  41. async def info(ctx, user: discord.Member):
  42. author = ctx.message.author
  43.  
  44. embed = discord.Embed(
  45. colour = discord.Colour.blue()
  46. )
  47. embed.set_author(name="info")
  48. embed.add_field(name="The users Name is:", value="{}".format(user.name))
  49. embed.add_field(name="The users ID is:", value="{}".format(user.id))
  50. embed.add_field(name="The users status is:", value="{}".format(user.status))
  51. embed.add_field(name="The users highest role is:", value="{}".format(user.top_role))
  52. embed.add_field(name="The user joined at:", value="{}".format(user.joined_at))
  53.  
  54. await bot.send_message(author, embed=embed)
  55.  
  56.  
  57. @bot.command(pass_context=True)
  58. async def kick(ctx, user: discord.User):
  59. if ctx.message.author.server_permissions.kick_members:
  60. try:
  61. await bot.say(":boot: Cya, **{}**. Ya loser!".format(user.name))
  62. await bot.kick(user)
  63. except discord.errors.Forbidden:
  64. await bot.say('Either I do not have permission to ban people, or the person you are trying to ban is a role above me.')
  65. else:
  66. await bot.say("If you feel like someone is being bad or in conflict with you, contact a mod or higher that is online")
  67.  
  68. @bot.command(pass_context=True)
  69. async def ban(ctx, userName: discord.User):
  70. if ctx.message.author.server_permissions.ban_members:
  71. try:
  72. await bot.ban(userName)
  73. await bot.say('user **{}** has been banned from the server.'.format(userName))
  74. except discord.errors.Forbidden:
  75. await bot.say('Either I do not have permission to ban people, or the person you are trying to ban is a role above me.')
  76. else:
  77. await bot.say("If you feel like someone is being bad or in conflict with you, contact a mod or higher that is online!")
  78.  
  79. @bot.command(pass_context=True)
  80. async def eightball(ctx):
  81. await bot.say(random.choice([ "It is certain :8ball:",
  82. "It is decidedly so :8ball:",
  83. "Without a doubt :8ball:",
  84. "Yes, definitely :8ball:",
  85. "You may rely on it :8ball:",
  86. "As I see it, yes :8ball:",
  87. "Most likely :8ball:",
  88. "Outlook good :8ball:",
  89. "Yes :8ball:",
  90. "Signs point to yes :8ball:",
  91. "Reply hazy try again :8ball:",
  92. "Ask again later :8ball:",
  93. "Better not tell you now :8ball:",
  94. "Cannot predict now :8ball:",
  95. "Concentrate and ask again :8ball:",
  96. "Don't count on it :8ball:",
  97. "My reply is no :8ball:",
  98. "My sources say no :8ball:",
  99. "Outlook not so good :8ball:",
  100. "Very doubtful :8ball:"]))
  101.  
  102.  
  103.  
  104. @bot.command(pass_context=True)
  105. async def ping(ctx):
  106. await bot.say(ctx.message.author.mention)
  107. return await bot.say("Pinged now u happy?")
  108. print ("user has pinged")
  109.  
  110. @bot.command(pass_context=True)
  111. async def RickRoll(ctx):
  112. await bot.say("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
  113.  
  114. @bot.command(pass_context=True)
  115. async def loganpaul(ctx):
  116. await bot.say("https://www.youtube.com/channel/UCG8rbF3g2AMX70yOd8vqIZg")
  117.  
  118. @bot.command(pass_context=True)
  119. async def jakepaul(ctx):
  120. await bot.say("https://www.youtube.com/watch?v=hSlb1ezRqfA")
  121.  
  122.  
  123. @bot.command(pass_context=True)
  124. async def clear(ctx, amount=5):
  125. print("clear Command")
  126. if ctx.message.author.server_permissions.ban_members:
  127. channel = ctx.message.channel
  128. messages = []
  129. async for message in bot.logs_from(channel, limit=int(amount) + 1):
  130. messages.append(message)
  131. await bot.delete_messages(messages)
  132. print("clear Auth")
  133. else:
  134. await bot.send_message(ctx.message.channel, "Permission Denied")
  135. print("clear Block")
  136.  
  137.  
  138. @bot.command(pass_context=True)
  139. async def help(ctx):
  140. author = ctx.message.author
  141.  
  142. embed = discord.Embed(
  143. colour = discord.Colour.blue()
  144. )
  145.  
  146. embed.set_author(name="help")
  147. embed.add_field(name="prefix", value=":", inline=True)
  148. embed.add_field(name="ping", value="Ping the creator of this bot!", inline=False)
  149. embed.add_field(name="ban", value="Ban people from your server", inline=False)
  150. embed.add_field(name="kick", value="Kick people from your server", inline=False)
  151. embed.add_field(name="clear", value="clear the chat", inline=False)
  152. embed.add_field(name="say", value="Make the bot say anything you want", inline=False)
  153. embed.add_field(name="warn", value="Warn people on your server", inline=False)
  154. embed.add_field(name="eightball", value="ask some random question and it will answer randomly", inline=False)
  155. embed.add_field(name="RickRoll", value="Send a link to a rickroll video", inline=False)
  156. embed.add_field(name="loganpaul", value="Send a link for loganpaul's channel", inline=False)
  157. embed.add_field(name="jakepaul", value="senda link to Its everyday bro", inline=False)
  158. embed.add_field(name="info", value="gives an info about u or other people u ping", inline=False)
  159.  
  160.  
  161. await bot.send_message(author, embed=embed)
  162.  
  163. @bot.command(pass_context=True)
  164. async def join(ctx):
  165. channel = ctx.message.author.voice.voice_channel
  166. await bot.join_voice_channel(channel)
  167.  
  168. @bot.command(pass_context=True)
  169. async def leave(ctx):
  170. server = ctx.message.server
  171. voice_client = bot.voice_client_in(server)
  172. await voice_client.disconnect()
  173.  
  174. @bot.command(pass_context=True)
  175. async def play(ctx,url):
  176. server = ctx.message.server
  177. voice_client = bot.voice_client_in(server)
  178. player = await voice_client.create_ytdl_player("ytsearch:" + url, after=lambda: check_queue(server.id))
  179. players[server.id] = player
  180. player.start()
  181.  
  182. @bot.command(pass_context=True)
  183. async def cf(ctx):
  184. await bot.say(random.choice([ "head",
  185. "tail"]))
  186.  
  187.  
  188.  
  189. bot.run("4382964327642389462839")101% my token no scam
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement