May 17, 2026, 11:40 PM
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
# Inicjalizacja bota
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
bot = commands.Bot(command_prefix="!", intents=intents)
|
||||
|
||||
# Event: bot jest gotowy do użycia
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
print(f'Zalogowano jako {bot.user}')
|
||||
|
||||
# Przykładowa komenda
|
||||
@bot.command(name="hello")
|
||||
async def hello(ctx):
|
||||
await ctx.send(f'Witaj, {ctx.author.name}!')
|
||||
|
||||
# Uruchomienie bota z tokenem
|
||||
bot.run('YOUR_TOKEN_HERE')
|
||||
Reference in New Issue
Block a user