daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Feb 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @client.command(pass_context=True)
  2. async def purge (ctx, amount=0):
  3.     if ctx.message.server == None:
  4.         embed = discord.Embed(title='Hiba!', description='Ezt a parancsot nem használhatod privát üzenetekben!', colour=discord.Colour.red())
  5.         embed.set_footer(text="DaniBot | v1.0")
  6.         return await client.say(embed=embed)
  7.     if not ctx.message.server_permissions.Administrator:
  8.         embed = discord.Embed(title='Hiba!', description='Nincs jogod ehhez!', colour=discord.Colour.red())
  9.         embed.set_footer(text="DaniBot | v1.0")
  10.         return await client.say(embed=embed)
  11.     if not amount >1:
  12.         embed = discord.Embed(title='Hiba', description='Használat: -purge (Szám[>1])', colour=discord.Colour.red())
  13.         embed.set_footer(text="DaniBot | v1.0")
  14.         return await client.say(embed=embed)
  15.     channel = ctx.message.channel
  16.     messages = [ ]
  17.     async for message in client.logs_from(channel, limit=int(amount)):
  18.         messages.append(message)
  19.     await client.delete_messages(messages)
  20.     embed = discord.Embed(title='Üzenetek törölve!', colour=discord.Colour.green())
  21.     embed.set_footer(text="DaniBot | v1.0")
  22.     await client.say(embed=embed)
  23.    
  24. @client.command(pass_context=True)
  25. async def say(ctx, *, text: str="None"):
  26.     if ctx.message.server == None:
  27.         embed = discord.Embed(title='Hiba!', description='Ezt a parancsot nem használhatod privát üzenetekben!', colour=discord.Colour.red())
  28.         embed.set_footer(text="DaniBot | v1.0")
  29.         return await client.say(embed=embed)
  30.     if not ctx.message.server_permissions.Administrator:
  31.         embed = discord.Embed(title='Hiba!', description='Nincs jogod ehhez!', colour=discord.Colour.red())
  32.         embed.set_footer(text="DaniBot | v1.0")
  33.         return await client.say(embed=embed)
  34.     if text == "None":
  35.         embed = discord.Embed(title='Hiba!', description='Használat: -say (Üzenet)', colour=discord.Colour.red())
  36.         embed.set_footer(text="DaniBot | v1.0")
  37.         return await client.say(embed=embed)
  38.     await client.delete_message(ctx.message)
  39.     embed = discord.Embed(colour=discord.Colour.gold())
  40.     embed.set_footer(text="DaniBot | v1.0")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top