ืืื ืืืฆืืจ ืืช ืืื ืืืืกืงืืจื ืืจืืฉืื ืฉืื ืืฉื ืช 2026 ืืืืฆืขืืช JavaScript (discord.js) ืื Python (discord.py) - ืืืืจืฉืื ืืขื ืืคืจืืกื, ืฆืขื ืืืจ ืฆืขื.
Grow your server faster with Rally
Rally gives server owners community management tools, member engagement features, and discovery placement โ all in one bot. Add it to your server in 2 minutes.
Add Rally to your server โืืฆืืจืช ืืื ืืืืกืงืืจื ืืจืืฉืื ืฉืื ืงืื ืืืชืจ ืืื ืฉืืชื ืืืฉื. ืืชื ืื ืฆืจืื ืชืืืจ ืืืืขื ืืืืฉื ืื ืฉื ืืช ื ืืกืืื ืืชืื ืืช. ืืฉื ืช 2026, ืื ืืื ืืคืจืืกื ืฉื ืืื ืคืื ืงืฆืืื ืื ืืืจืืช ืกืืฃ ืฉืืืข ืื ืืชื ืืืืงื.
ืืืจืื ืื ืืืจืื ืืืชื ืืื ืืชืืืื: ืจืืฉืื ืืืื ืฉืื, ืืชืืืช ืืคืงืืื ืืจืืฉืื ื ืฉืื, ืืืืงืชื ืืืืคื ืืงืืื ืืคืจืืกืชื ืืฉืืืืจ ืื. ืขื ืืกืืฃ, ืืืื ืื ืืื ืฉืคืืขื ืืฉืจืช ืฉืื.
ืืื ืืืกืงืืจื ืืื ืชืืื ืืช ืฉืืชืืืจืช ืืืืกืงืืจื ืืืืฆืขืืช ื-API ืืืืืื ืืืืจืืขืื: ืืืฉืจ ืืืฉืื ืืงืืื ืคืงืืื, ืืืื ืืืืืขื, ืืฆืืจืฃ ืืฉืจืช ืืื'.
ืืืฉืื ืืคืชื:
/command) ืืืงืื ืืคืงืืืืช ืงืืืืืช (!command). ืคืงืืืืช ืกืืืฉ ื ืชืืืืช ืจืฉืืืช ืืืืืืฆืืช.ืืื ืืืื ืฉืื ืงืืื ืจืฉืืืช ืืืขืจืืช ืฉื ืืืกืงืืจื.
ืชืืืื:
ืขืืฉืื ืฆืืจ ืืช ืืฉืชืืฉ ืืืื:
ืืืืจ ืืช ืืืืจืืช ืืืื:
ืืชื ืฆืจืื ืงืืฉืืจ ืืืื ื ืืืืื ืืื ืืืืกืืฃ ืืช ืืืื ืืฉืจืช.
ืืคืืจืื ืืืคืชืืื:
botSend Messages (ืืืื ื ืืื ืืื)Manage Messages (ืื ืืชื ืืืชื)Add Reactions (ืื ืืืื ืืืื ืืืืจืื)Connect + Speak (ืื ืื ืืื ืืืืืงื/ืงืื)Send Messages + Read Messages (ืืื ืืืื ืืจ ืงืืืื)ืื ืชืฉืชืืฉ ืืืจืฉืืช ืื ืื ืืื ืื ืื ืื ืืืจืื ืืืืืืื. ืืจืฉืืช ืืชืจ ืืื ืกืืืื ืืืืื.
ืฉืชื ืืคืฉืจืืืืช ืขืืงืจืืืช ืืืชืืืืื:
Discord.js ืืื ืืกืืจืช ืืืืืื ืืคืืคืืืจืืช ืืืืชืจ ืฉื ืืืกืงืืจื. ืงืืืื ืขื ืงืืช, ืืื ืืช ืฉื ืืืจืืืื ืืชืืขืื ืืฆืืื.
ืืชืจืื ืืช:
ืืกืจืื ืืช:
ืืชืื:
npm init -ynpm install discord.jsืชืืืืจ ืคืฉืื ืืืชืจ, ื ืืืจ ืืืชืืืืื, ืืฆืืื ืืืืืื ืืกืืืืช.
ืืชืจืื ืืช:
ืืกืจืื ืืช:
ืืชืื:
pip install discord.pyืืืืฆื ืืืชืืืืื: ืื ืืชื ืืืืจ Python, ืืฉืชืืฉ ื-discord.py. ืื ืืชื ืืืืจ JavaScript, ืืฉืชืืฉ ื-discord.js. ืื ืืชื ืื ืืืืจ ืืฃ ืืื ืืื, Python ืงื ืืืชืจ ืืืืืื, ืืื ื-JavaScript ืืฉ ืืืชืจ ืืฉืืืื ืืืื ืืจื ื. ืืืจ ืืื ืืืชืืืื.
ืื ื ืืื ืืืกืงืืจื ืขืืื ืืื ืืืื ื-Python ืฉืืืื ืืคืงืืื:
import discord
from discord.ext import commands
# Create bot with command prefix and intents
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='!', intents=intents)
@bot.event
async def on_ready():
print(f'{bot.user} has connected to Discord!')
@bot.command(name='hello', help='Says hello')
async def hello(ctx):
await ctx.send(f'Hello {ctx.author.name}!')
@bot.command(name='ping', help='Responds with pong')
async def ping(ctx):
await ctx.send('Pong!')
bot.run('YOUR_TOKEN_HERE')
ืื ืื ืขืืฉื:
!hello ื-!pingืืื ืืืคืขืื ืืืชื:
'YOUR_TOKEN_HERE' ืืืกืืืื ืืืืืชื ืฉืื ืืฉืื 1bot.pypython bot.py!hello ืืื ืขืจืืฅืืคื ื ืืคืจืืกื, ืืืืง ืืช ืืืื ืฉืื ืืืืคื ืืงืืื (ืืืืฉื ืฉืื).
ืืืืจ ืฉืจืช ืืืืงื:
ืฉืืืืืช ื ืคืืฆืืช:
ืืืืง ืืืกืืืืืช. ืืื ืขื ืืืืื ืืืืฆืืจ ืืืื.
ืืขืช, ืืฉืืชื ืืืื ืืช ืืืกืืืืช, ืืจืื ืขื ืชืืื ืืช ื ืืกืคืืช.
ืืืืื ืฉื Python - ืคืงืืืช ืืืืื ืคืฉืืื:
@bot.command(name='balance', help='Check your coin balance')
async def balance(ctx):
# In a real bot, this would query a database
# For now, just return a mock value
await ctx.send(f'{ctx.author.name}, you have 100 coins!')
@bot.command(name='roll', help='Roll a dice (1-6)')
async def roll(ctx):
import random
result = random.randint(1, 6)
await ctx.send(f'{ctx.author.name} rolled: **{result}**')
ืื ืคืงืืื ืืื ืคืื ืงืฆืื ืคืฉืืื. ืืืกืฃ ืืื ืฉืืชื ืจืืฆื.
ืืืจืื ืืงืืื ืขืืื ืืืืืงื, ืืื ืืืื ืฉืื ืืคืกืืง ืืฉืืชื ืกืืืจ ืืช ืืืืฉื ืื ืืื ืฉืื. ืคืจืืก ืืฉืจืช ืืื ืฉืืื ืืคืขื 24/7.
Replit (ืืงื ืืืืชืจ ืืืชืืืืื):
Railway.app (ืืืืจื ื, ืืืื):
Glitch (ืืืื ื-Replit):
ืืฉืื: ืื ืชืงืืื ืืช ืืืกืืืื ืฉืื ืืงืื ืฉืืชื ืืืืฃ ื-GitHub. ืืฉืชืืฉ ืืืฉืชื ื ืกืืืื:
import os
from dotenv import load_dotenv
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
bot.run(TOKEN)
ืฆืืจ ืงืืืฅ .env ืืืืคื ืืงืืื (ืืืกืฃ ื-.gitignore ืื ืฉืืื ืื ืืืขืืจ):
DISCORD_TOKEN=your_actual_token_here
ื-Replit/Railway, ืืืืจ ืืช ืืืกืืืื ืืืฉืชื ื ืกืืืื ืกืืื ืืืืืจืืช ืืคืืืคืืจืื (ืื ืืงืื).
ืืขืืช 1: ืงืืืื ืงืฉืื ืฉื ืืืกืืืื ืืขืืื ืื ืชืฉืื ืืช ืืืกืืืื ืฉืื ืืงืื ืฉืืชื ืืืืฃ ื-GitHub. ืืืืื ืขื ืืกืืืื ืื ืืืืคืื ื ืคืืขืื ืืืืคื ืืืืื. ืืฉืชืืฉ ืืืฉืชื ื ืกืืืื.
ืืขืืช 2: ืื ืืืคื ืืฉืืืืืช ืืืื ืฉืื ืงืืจืก ืืงืื ืื ืฆืคืื. ืืืกืฃ ืืืคืื ืืฉืืืืืช:
@bot.command()
async def divide(ctx, a: int, b: int):
try:
result = a / b
await ctx.send(result)
except ZeroDivisionError:
await ctx.send('Cannot divide by zero!')
except ValueError:
await ctx.send('Please enter valid numbers!')
ืืขืืช 3: ืื ืืืื ืืืืืืช ืงืฆื ืืืกืงืืจื ืืืืื ืืช ืืืืืจืืช ืฉืื ืืชื ืืืื ืืฉืืื ืืืืขืืช. ืื ืชืฉืื ืกืคืื ื-API. ืืืกืฃ ืขืืืืืื ืืื ืคืขืืืืช ืืืืืช ืืืืื.
ืืขืืช 4: ืืชืขืืืืช ืืืืื ืืช ืืืืื ืืชืืืืื ืจืืื ื ืืฉืืื ืืืืืื ืฉืื ืื ืืคืขืืืื ืืืื ืืช ื ืืืฆืืช ืืคืืจืื ืืืคืชืืื. ืืืืง ืืช ืืืืื ืืช ืฉืืืื ืฉืื ืฆืจืื ืืคื ื ืืคืจืืกื.
ืืขืืช 5: ืืืงืฃ ืฉืืคืชื ื ืืื ืื ืชื ืกื ืืื ืืช ืืขืจืืช ืืืืื, ืืืชืื, ืืืืืงื ื-50 ืคืงืืืืช ืืืื ืืจืืฉืื ืฉืื. ืืชืื ืขื 3-5 ืคืงืืืืช ืคืฉืืืืช. ืืจืื ืืจืืข ืฉืืชื ืืจืืืฉ ืื ืื.
ืืขืช ืืฉืืฉ ืื ืืื ืืกืืกื:
/command ืืืืจื ื ืืืงืื ืคืงืืืืช ืงืืืืืชืืื ืืืืกืงืืจื ืืจืืฉืื ืฉืื ืืื ืคืจืืืงื ืฉื ืกืืฃ ืฉืืืข. ืืื ืืืืกืงืืจื ืืืื ืืจืืฉืื ืฉืื ืืื ืืืืฉ ืฉื ืชืจืืื. ืืืื ืืจืืฉืื ืฉืื ืฉื ืืฆื ืืฉืืืืฉ ืขื ืืื 1,000 ืฉืจืชืื ืืื ืืืืฉืื ืฉื ืืืืจืฆืื, ืคืืชืื ืชืืื ืืช ืืื ืืืช ืงืืืื. ืืชืื ืขืืฉืื, ืืืืจ ืขื ืขืฆืื ืื ืืืื ืืื ืชืืฉืื ืขื ืื ืืืชืจ ืืื.