Facebook
From Dominik Banach, 3 Years ago, written in Python.
Embed
Download Paste or View Raw
Hits: 176
  1. import discord
  2. from discord.ext import commands
  3. from time import sleep
  4.  
  5. client = commands.Bot(command_prefix = '>')
  6.  
  7. @client.event
  8. async def on_ready():
  9.     print("BOT online")
  10.  
  11. @client.command()
  12. async def clear(ctx, *, ile = 1):
  13.  
  14.     try:
  15.          if ile > 0:
  16.              await ctx.channel.purge(limit = ile + 1)
  17.          else:
  18.              await ctx.send("Podaj wartość większą od zera!")
  19.  
  20.     except ValueError:
  21.         await ctx.send("Ilość wiadomości do usunięcia musi być podana liczbą!")
  22.    
  23.  
  24. @client.command()
  25. async def szpadzik(ctx, *, ile):
  26.  
  27.         await ctx.channel.purge(limit = 1)
  28.    
  29.     for i in range(int(ile)):
  30.                 sleep(1)
  31.         await ctx.send(f"Szpadzik to jest ziomal! po raz {i+1}")  
  32.        
  33.  
  34. client.run("***0MDEy******TkzODk3.****FjQ.ok*******mzDtXqMBl42***Q")
  35.  
  36.  
  37.  

Replies to irytowanie Szpadzika - python discord bot rss

Title Name Language When
Re: irytowanie Szpadzika - python discord bot Dominik Banach python 3 Years ago.