npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

sencinion

v1.0.5

Published

Türkçe Discord.js wrapper - Modern, performanslı ve kullanıcı dostu Discord bot geliştirme kütüphanesi

Readme

Sencinion.js - Türkçe Discord.js Wrapper

🚀 Modern, performanslı ve kullanıcı dostu Discord bot geliştirme kütüphanesi

npm version License: MIT Node.js Version

🌟 Özellikler

  • 🇹🇷 Türkçe API: Kolay anlaşılır Türkçe metodlar (baslat(), komutEkle(), dinleyiciEkle())
  • ⚡ Modern ES6+: Async/await, ES modules, modern JavaScript özellikleri
  • 🧩 Modüler Mimari: Komut, event ve hata yönetimi için ayrı bileşenler
  • 🔧 Kolay Konfigürasyon: JSON/JS config dosyaları ve environment variables
  • 📦 Plugin Sistemi: Üçüncü parti eklentiler için altyapı
  • 🛡️ Güvenlik: Rate limiting, input validation, hata yönetimi
  • 📊 Performans: Cache sistemi, bellek optimizasyonu
  • 🎯 TypeScript Desteği: Type definitions ve IntelliSense
  • 🖥️ CLI Araçları: Proje başlatma, komut/event oluşturma
  • 📝 Detaylı Loglama: Renkli console output ve dosya loglama

🚀 Hızlı Başlangıç

1. Kurulum

npm install sencinion

2. Bot Oluşturma

import Sencinion from 'sencinion'

const bot = new Sencinion({
  token: process.env.DISCORD_TOKEN,
  prefix: '!',
  sahipler: ['SAHIP_ID']
})

// Komut ekleme
bot.komutEkle({
  isim: 'ping',
  aciklama: 'Botun gecikmesini gösterir',
  kategori: 'genel',
  async calistir({ mesaj }) {
    await mesaj.yanitla('🏓 Pong!')
  }
})

// Event dinleyici
bot.dinleyiciEkle('mesajOlusturuldu', async (mesaj) => {
  if (mesaj.icerik === '!merhaba') {
    await mesaj.yanitla('Merhaba! 👋')
  }
})

// Botu başlat
await bot.baslat()

3. Çalıştırma

node main.js

📋 API Referansı

Sencinion Sınıfı

| Metod | Açıklama | Örnek | |-------|----------|--------| | baslat() | Botu başlatır | await bot.baslat() | | komutEkle(komut) | Komut ekler | bot.komutEkle(komutObj) | | dinleyiciEkle(event, callback) | Event dinleyici ekler | bot.dinleyiciEkle('ready', callback) | | pluginYukle(plugin, secenekler) | Plugin yükler | await bot.pluginYukle('plugin-adi') | | cacheAl(anahtar) | Cache'den veri alır | bot.cacheAl('anahtar') | | cacheEkle(anahtar, veri, sure) | Cache'e veri ekler | bot.cacheEkle('anahtar', veri) | | rateLimitKontrol(kullaniciId) | Rate limit kontrolü | bot.rateLimitKontrol(id) |

Komut Yapısı

export default {
  isim: 'komut-adi',
  aciklama: 'Komut açıklaması',
  kategori: 'genel',
  kullanim: 'komut-adi [argümanlar]',
  ornekler: ['komut-adi argüman'],
  izinler: ['SEND_MESSAGES'],
  cooldown: 5,
  sadeceSahip: false,

  async calistir({ mesaj, argumanlar, client, log }) {
    // Komut mantığı
    await mesaj.reply('Merhaba!')
  }
}

Event Yapısı

export default {
  isim: 'event-adi',
  aciklama: 'Event açıklaması',

  async calistir({ client, log }, ...argumanlar) {
    // Event mantığı
    log('Event tetiklendi!')
  }
}

🛠️ CLI Araçları

Proje Başlatma

npx sencinion init

Bu komut şunları oluşturur:

  • sencinion.config.js - Konfigürasyon dosyası
  • main.js - Ana bot dosyası
  • komutlar/ - Komut klasörü
  • eventler/ - Event klasörü
  • .env - Environment variables
  • README.md - Proje dokümantasyonu

Komut Oluşturma

npx sencinion create-command komut-adi

Event Oluşturma

npx sencinion create-event event-adi

Yardım

npx sencinion help

📁 Proje Yapısı

sencinion-proje/
├── lib/                    # Ana kütüphane dosyaları
│   ├── Sencinion.js       # Ana sınıf
│   ├── KomutYoneticisi.js # Komut yönetimi
│   ├── EventYoneticisi.js # Event yönetimi
│   ├── HataYoneticisi.js  # Hata yönetimi
│   └── Yardimcilar.js     # Yardımcı fonksiyonlar
├── komutlar/              # Komut dosyaları
│   ├── genel/
│   │   ├── ping.js
│   │   └── yardim.js
│   ├── moderasyon/
│   └── eglence/
├── eventler/              # Event dosyaları
│   ├── ready.js
│   ├── messageCreate.js
│   └── interactionCreate.js
├── logs/                  # Log dosyaları
├── main.js               # Ana bot dosyası
├── sencinion.config.js   # Konfigürasyon
├── .env                  # Environment variables
└── README.md             # Dokümantasyon

⚙️ Konfigürasyon

sencinion.config.js

export default {
  // Discord bot token'i
  token: process.env.DISCORD_TOKEN,

  // Komut ön eki
  prefix: '!',

  // Bot sahipleri
  sahipler: ['SAHIP_ID_1', 'SAHIP_ID_2'],

  // Gateway intents
  intents: [
    'GUILDS',
    'GUILD_MESSAGES',
    'MESSAGE_CONTENT'
  ],

  // Cache ayarları
  cache: {
    aktif: true,
    buyukluk: 1000,
    sure: 300000 // 5 dakika
  },

  // Rate limiting
  rateLimit: {
    aktif: true,
    istek: 5,
    pencere: 15000 // 15 saniye
  },

  // Log ayarları
  log: {
    seviye: 'info',
    renkli: true
  }
}

Environment Variables (.env)

DISCORD_TOKEN=your_bot_token_here
NODE_ENV=development
DB_URL=mongodb://localhost:27017/sencinion

🔧 Gelişmiş Özellikler

Middleware Sistemi

// Middleware ekleme
bot.middlewareEkle(async (baglam, secenekler) => {
  // Komut öncesi işlemler
  console.log('Komut çalıştırılıyor:', baglam.komut.isim)

  // true dönerse komut çalışır, false dönerse durur
  return true
}, {
  zaman: 'once', // 'once', 'sonra', 'herikiside'
  sira: 1
})

Plugin Sistemi

// Plugin yükleme
await bot.pluginYukle('@sencinion/database', {
  tur: 'mongodb',
  url: process.env.DB_URL
})

Cache Sistemi

// Cache'e veri ekleme
bot.cacheEkle('kullanici_verisi', veri, 60000) // 1 dakika

// Cache'den veri alma
const veri = bot.cacheAl('kullanici_verisi')

Rate Limiting

// Rate limit kontrolü
if (bot.rateLimitKontrol(kullaniciId, 'komut')) {
  await mesaj.reply('⏱️ Çok fazla komut kullanıyorsunuz!')
  return
}

📊 Performans ve Optimizasyon

  • Bellek Yönetimi: Otomatik cache temizleme ve garbage collection optimizasyonu
  • Ağ Optimizasyonu: Request batching ve retry mekanizması
  • CPU Optimizasyonu: Event loop blocking önleme
  • Hata Yönetimi: Graceful error handling ve recovery

🛡️ Güvenlik

  • Input Validation: Tüm input'ların doğrulanması
  • SQL Injection Koruması: Parametrelenmiş sorgular
  • XSS Koruması: HTML escaping
  • Rate Limiting: Spam koruması
  • Permission Kontrolü: Komut izinleri

🧪 Test

# Unit testler
npm test

# Coverage raporu
npm run test:coverage

# Lint kontrolü
npm run lint

📚 Dokümantasyon

🤝 Katkıda Bulunma

  1. Fork edin
  2. Feature branch oluşturun (git checkout -b feature/amazing-feature)
  3. Commit edin (git commit -m 'Add amazing feature')
  4. Push edin (git push origin feature/amazing-feature)
  5. Pull Request oluşturun

📝 Lisans

Bu proje MIT lisansı altında lisanslanmıştır. Detaylar için LICENSE dosyasına bakın.

🙏 Teşekkürler

📞 İletişim


Sencinion.js ile Discord botlarınızı kolayca geliştirin! 🚀