import discord from discord.ext import commands from time import sleep client = commands.Bot(command_prefix = '>') @client.event async def on_ready(): print("BOT online") @client.command() async def clear(ctx, *, ile = 1): try: if ile > 0: await ctx.channel.purge(limit = ile + 1) else: await ctx.send("Podaj wartość większą od zera!") except ValueError: await ctx.send("Ilość wiadomości do usunięcia musi być podana liczbą!") @client.command() async def szpadzik(ctx, *, ile): for i in range(int(ile)): await ctx.send(f"Szpadzik to jest ziomal! po raz {i+1}") sleep(1) client.run("NzA0MDEyNDc0MTA1NTkzODk3.XqdFjQ.okaf4Hdbz705NmzDtXqMBl42a6Q")