Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @client.command(pass_context=True)
- async def purge (ctx, amount=0):
- if ctx.message.server == None:
- embed = discord.Embed(title='Hiba!', description='Ezt a parancsot nem használhatod privát üzenetekben!', colour=discord.Colour.red())
- embed.set_footer(text="DaniBot | v1.0")
- return await client.say(embed=embed)
- if not ctx.message.server_permissions.Administrator:
- embed = discord.Embed(title='Hiba!', description='Nincs jogod ehhez!', colour=discord.Colour.red())
- embed.set_footer(text="DaniBot | v1.0")
- return await client.say(embed=embed)
- if not amount >1:
- embed = discord.Embed(title='Hiba', description='Használat: -purge (Szám[>1])', colour=discord.Colour.red())
- embed.set_footer(text="DaniBot | v1.0")
- return await client.say(embed=embed)
- channel = ctx.message.channel
- messages = [ ]
- async for message in client.logs_from(channel, limit=int(amount)):
- messages.append(message)
- await client.delete_messages(messages)
- embed = discord.Embed(title='Üzenetek törölve!', colour=discord.Colour.green())
- embed.set_footer(text="DaniBot | v1.0")
- await client.say(embed=embed)
- @client.command(pass_context=True)
- async def say(ctx, *, text: str="None"):
- if ctx.message.server == None:
- embed = discord.Embed(title='Hiba!', description='Ezt a parancsot nem használhatod privát üzenetekben!', colour=discord.Colour.red())
- embed.set_footer(text="DaniBot | v1.0")
- return await client.say(embed=embed)
- if not ctx.message.server_permissions.Administrator:
- embed = discord.Embed(title='Hiba!', description='Nincs jogod ehhez!', colour=discord.Colour.red())
- embed.set_footer(text="DaniBot | v1.0")
- return await client.say(embed=embed)
- if text == "None":
- embed = discord.Embed(title='Hiba!', description='Használat: -say (Üzenet)', colour=discord.Colour.red())
- embed.set_footer(text="DaniBot | v1.0")
- return await client.say(embed=embed)
- await client.delete_message(ctx.message)
- embed = discord.Embed(colour=discord.Colour.gold())
- embed.set_footer(text="DaniBot | v1.0")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement