Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext.commands import Bot
- from discord.ext import commands
- import asyncio
- from time import sleep
- prefix = "!"
- token = "authorization token herer"
- bot = commands.Bot(command_prefix=prefix, self_bot=True)
- bot.remove_command("help")
- @bot.event
- async def on_ready():
- print ("Yup im online my meister")
- print ("Name: {}".format(bot.user.name))
- print ("ID: {}".format(bot.user.id))
- @bot.command(pass_context=True)
- async def clear(ctx, limit: int=None):
- async for msg in bot.logs_from(ctx.message.channel, limit=limit):
- if msg.author.id == bot.user.id:
- try:
- await bot.delete_message (msg)
- except:
- pass
- embed = discord.Embed(description="Action completed! :smile:", color=0x00ff00)
- #await bot.say(embed=embed)
- bot.run(token, bot=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement