Skip to content

CodeMeet Go SDK v1.0.0 — اولین انتشار رسمی

Choose a tag to compare

@AbolfazlZarei-dev AbolfazlZarei-dev released this 30 Aug 10:04
· 10 commits to main since this release
828686c

🚀 CodeMeet Go SDK v1.0.0

🇮🇷 فارسی

اولین انتشار رسمی CodeMeet Go SDK؛ یک کتابخانه مدرن و ماژولار برای توسعه ربات‌های CodeMeet با زبان Go.

این نسخه با تمرکز بر سادگی استفاده، معماری ماژولار، مدیریت همزمانی، کنترل درخواست‌ها، مدیریت خطا و فراهم‌کردن ابزارهای موردنیاز برای اجرای ربات در محیط‌های واقعی ارائه شده است.

✨ قابلیت‌های اصلی

  • 🌐 کلاینت HTTP برای ارتباط با CodeMeet Bot API
  • 🤖 متدهای مدیریت Bot و پروفایل
  • 💬 ارسال، ویرایش، کپی، فوروارد و حذف پیام‌ها
  • 🖼️ پشتیبانی از Media و فایل‌ها
  • ⌨️ Inline Keyboard و Reply Keyboard
  • 👥 مدیریت Chat، Group و Channel
  • 🔄 دریافت Update با Long Polling
  • 🔗 پشتیبانی از Webhook
  • 🎯 Dispatcher برای مدیریت Handlerها
  • 🧩 Middlewareهای قابل استفاده
  • ⚡ Rate Limiting و کنترل Concurrency
  • 🔁 Retry Policy
  • 💾 In-Memory Cache و Sharded Cache
  • 🛡️ Circuit Breaker در لایه API
  • 📊 آمار و Metrics
  • 📝 Logger با خروجی Text و JSON و حالت Async
  • ❌ سیستم مدیریت خطای ساختاریافته
  • 🧰 مجموعه‌ای از پکیج‌های کمکی در contrib

🛡️ پکیج‌های Contrib

این نسخه شامل پکیج‌های مستقل و اختیاری زیر است:

  • antilink
  • antispam
  • forcejoin
  • gatekeeper
  • maintenancemode
  • profanityfilter
  • vpndetector
  • warnsystem

این پکیج‌ها برای اضافه‌کردن قابلیت‌های سطح بالاتر به ربات طراحی شده‌اند و از هسته اصلی SDK مستقل هستند.

⚙️ معماری

CodeMeet Go به‌صورت ماژولار طراحی شده و بخش‌هایی مانند API Client، Methods، Models، Dispatcher، Middleware، Polling، Webhook، Cache، Rate Limiter، Retry، Logger و Error Handling را از یکدیگر جدا می‌کند.

این ساختار باعث می‌شود توسعه‌دهنده بتواند تنها بخش‌های موردنیاز پروژه خود را استفاده کند و در صورت نیاز قابلیت‌های بیشتری به ربات اضافه کند.

📦 نصب

go get github.com/AbolfazlZarei-dev/codemeet-go

🚀 نمونه ساده

package main

import (
    "context"
    "log"

    codemeet "github.com/AbolfazlZarei-dev/codemeet-go"
    "github.com/AbolfazlZarei-dev/codemeet-go/models"
)

func main() {
    bot, err := codemeet.New("YOUR_BOT_TOKEN")
    if err != nil {
        log.Fatal(err)
    }
    defer bot.Close()

    bot.OnMessage(func(ctx context.Context, msg *models.Message) {
        _, err := bot.Reply(ctx, msg, "سلام! 👋")
        if err != nil {
            log.Println(err)
        }
    })

    if err := bot.StartPolling(
        context.Background(),
        nil,
    ); err != nil {
        log.Fatal(err)
    }
}

📚 مستندات

مستندات کامل پروژه شامل راهنمای شروع، Bot API، پیام‌ها و Media، Updateها، Chat Management، Keyboardها، Models، Package Reference، Methods، Middleware، قابلیت‌های Reliability، پکیج‌های contrib و مثال‌های استفاده در پوشه README قرار گرفته است.

⚠️ وضعیت نسخه 1.0.0

این اولین نسخه رسمی SDK است.

برخی قابلیت‌ها و Methodهای موجود در طراحی پروژه ممکن است برای هماهنگی با نسخه‌های آینده Bot API از قبل در ساختار کتابخانه پیش‌بینی شده باشند. بنابراین وجود نام یک Method در برخی بخش‌های مستندات یا ساختار پروژه لزوماً به معنی فعال‌بودن آن قابلیت در نسخه فعلی Bot API نیست.

در مواردی که یک قابلیت هنوز در Bot API فعلی CodeMeet پیاده‌سازی نشده باشد، API آن صرفاً به‌عنوان بخشی از طراحی آینده SDK در نظر گرفته شده است و در Releaseهای بعدی، در صورت اضافه‌شدن قابلیت مربوطه به Bot API، امکان تکمیل یا اصلاح آن وجود دارد.

هدف این نسخه ارائه یک پایه پایدار و قابل توسعه برای SDK است و توسعه API همگام با Bot API در نسخه‌های آینده ادامه خواهد داشت.


🇬🇧 English

The first official release of CodeMeet Go SDK — a modern and modular Go library for building CodeMeet bots.

This release focuses on ease of use, modular architecture, concurrency management, request control, structured error handling, and the core infrastructure required for real-world bot applications.

✨ Main Features

  • 🌐 HTTP client for CodeMeet Bot API
  • 🤖 Bot and profile management methods
  • 💬 Message sending, editing, copying, forwarding and deletion
  • 🖼️ Media and file support
  • ⌨️ Inline and Reply keyboards
  • 👥 Chat, group and channel management
  • 🔄 Long Polling update handling
  • 🔗 Webhook support
  • 🎯 Dispatcher and handlers
  • 🧩 Middleware support
  • ⚡ Rate limiting and concurrency control
  • 🔁 Retry policies
  • 💾 In-memory and sharded caching
  • 🛡️ API-level circuit breaker
  • 📊 Statistics and metrics
  • 📝 Text, JSON and asynchronous logging
  • ❌ Structured error handling
  • 🧰 Optional contrib packages

🛡️ Contrib Packages

The release includes the following independent optional packages:

  • antilink
  • antispam
  • forcejoin
  • gatekeeper
  • maintenancemode
  • profanityfilter
  • vpndetector
  • warnsystem

These packages provide higher-level functionality while remaining separate from the SDK core.

⚙️ Architecture

CodeMeet Go uses a modular architecture that separates the API Client, Methods, Models, Dispatcher, Middleware, Polling, Webhook, Cache, Rate Limiter, Retry, Logger and Error Handling layers.

This allows developers to use only the components required by their applications and extend their bots when needed.

📦 Installation

go get github.com/AbolfazlZarei-dev/codemeet-go

🚀 Simple Example

package main

import (
    "context"
    "log"

    codemeet "github.com/AbolfazlZarei-dev/codemeet-go"
    "github.com/AbolfazlZarei-dev/codemeet-go/models"
)

func main() {
    bot, err := codemeet.New("YOUR_BOT_TOKEN")
    if err != nil {
        log.Fatal(err)
    }
    defer bot.Close()

    bot.OnMessage(func(ctx context.Context, msg *models.Message) {
        _, err := bot.Reply(ctx, msg, "Hello! 👋")
        if err != nil {
            log.Println(err)
        }
    })

    if err := bot.StartPolling(
        context.Background(),
        nil,
    ); err != nil {
        log.Fatal(err)
    }
}

📚 Documentation

Complete documentation is available in the README directory, covering Getting Started, Bot API, Messages and Media, Updates, Chat Management, Keyboards, Models, Package Reference, Methods, Middleware, Reliability features, contrib packages and practical examples.

⚠️ Version 1.0.0 Status

This is the first official SDK release.

Some methods and capabilities may have been designed in advance to support future versions of the CodeMeet Bot API. Therefore, the presence of a method in the SDK structure or documentation does not necessarily mean that the corresponding capability is currently available in the active Bot API.

When a capability is not yet implemented by the current CodeMeet Bot API, its API may exist as part of the SDK's forward-compatible design. It can be completed or adjusted in future releases when the corresponding Bot API functionality becomes available.

The goal of this release is to provide a stable and extensible foundation for the SDK, with continued API alignment and improvements in future releases.


👨‍💻 Author

Abolfazl Zarei

CodeMeet Go SDK is developed and maintained by Abolfazl Zarei.

📄 License

See the repository license for licensing details.


CodeMeet Go SDK v1.0.0
Built for Go developers. Built for CodeMeet. 🚀