Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext import commands
- import asyncio
- import youtube_dl
- TOKEN = ''
- client = commands.Bot(command_prefix = '!')
- @client.event
- async def on_ready():
- print('Bot is ready')
- #################################################################!kick,!ban, !mute################################################################################################
- @client.command()
- @commands.has_permissions(manage_messages=True)
- async def clear(self, ctx, amount: int):
- await ctx.channel.purge(limit=amount + 1)
- await ctx.send(f"{amount} messages got deleted")
- @client.command()
- @commands.has_permissions(kick_members=True)
- async def kick(ctx, member: discord.Member=None):
- if not member:
- await ctx.send("please specify a member")
- return
- await member.kick()
- await ctx.send("The user has been kicked")
- @client.command()
- @commands.has_permissions(ban_members=True)
- async def ban(ctx, member: discord.Member=None, reason = None):
- if not member:
- await ctx.send("please specify a member")
- return
- if reason == None:
- reason = "For no reason."
- message = f"You have been banned from {ctx.guild.name} for {reason}"
- await member.send(message)
- await member.ban()
- await ctx.send(f"{member.mention} got banned for {reason}")
- @client.command()
- @commands.has_permissions(manage_roles=True)
- async def mute(ctx, member: discord.Member=None):
- role = discord.utils.get(ctx.guild.roles, name="Muted")
- if not member:
- await ctx.send("Please specify a member")
- return
- await member.add_roles(role)
- await ctx.send("User has been muted")
- @client.command()
- @commands.has_permissions(manage_roles=True)
- async def unmute(ctx, member: discord.Member=None):
- role = discord.utils.get(ctx.guild.roles, name="Muted")
- if not member:
- await ctx.send("Please specify a member")
- return
- await member.remove_roles(role)
- await ctx.send("User has been unmuted")
- @client.command()
- @commands.has_permissions(kick_members=True)
- async def userinfo(ctx, member: discord.Member):
- roles = [role for role in member.roles]
- embed = discord.Embed(colour=member.colour, timestamp=ctx.message.created_at)
- embed.set_author(name=f"User info - {member}")
- embed.set_thumbnail(url=member.avatar_url)
- embed.set_footer(text=f"requested by {ctx.author}", icon_url=ctx.author.avatar_url)
- embed.add_field(name="ID", value=member.id)
- embed.add_field(name="Guild name:", value=member.display_name)
- embed.add_field(name="Created at:", value=member.created_at.strftime("%a, %#d %B %Y, %I:%M %p UTC"))
- embed.add_field(name="Joined at:", value=member.joined_at.strftime("%a, %#d %B %Y, %I:%M %p UTC"))
- await ctx.send(embed=embed)
- ################################################################################################errors###################################################################################################################
- #####################################################################################################################################################################################
- @client.command()
- async def ahri(ctx):
- embed = discord.Embed(title='Ahri Guide', description='LAST UPDATED: 20/03/2019 :white_check_mark: ')
- embed.colour = 0x880003
- embed.set_image(url='https://media.discordapp.net/attachments/556521044408795149/558045339412725780/ahri.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def akali(ctx):
- embed = discord.Embed(title='Akali Guide', description='LAST UPDATED: 20/03/2019 :white_check_mark: ')
- embed.colour = 0x880003
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045350238224399/akali.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def ashe(ctx):
- embed = discord.Embed(title='Ashe Guide', description='LAST UPDATED: 20/03/2019 :white_check_mark: ')
- embed.colour = 0x880003
- embed.set_image(url='https://media.discordapp.net/attachments/556521044408795149/558045344592691211/ashe.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def darius(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045347872636964/darius.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def draven(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045358425505793/draven.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def jhin(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark: ')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045376662470690/jhin.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def jinx(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045379300425746/jinx.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def katarina(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045369716441098/katarina.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def lux(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045373143187486/lux.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def master_yi(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045379405414441/master_yi.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def riven(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045383457112105/riven.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def teemo(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045385604726784/teemo.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def vayne(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045387156357141/Vayne.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def veigar(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045388804849664/veigar.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def vi(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045322849550336/Vi.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def xin(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://media.discordapp.net/attachments/556521044408795149/558045326993391617/xin.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def yasuo(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045361537810433/yasuo.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def yorick(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://cdn.discordapp.com/attachments/556521044408795149/558045366621044739/Yorick.PNG')
- await ctx.send(embed=embed)
- @client.command()
- async def zoe(ctx):
- embed = discord.Embed(title='Test Embed', description='LAST UPDATED: 20/03/2019 :white_check_mark:')
- embed.colour = 0xFFFFFF
- embed.set_image(url='https://media.discordapp.net/attachments/556521044408795149/558045339534360585/zoe.PNG')
- await ctx.send(embed=embed)
- client.run(TOKEN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement