Migrating to FTMGram
=====================

FTMGram is a **drop-in replacement** for both **FTMGram** and **FTMGram**.
Migration requires a single import change — no other code modifications needed.

From FTMGram
-------------

.. code-block:: python

   # Before
   from ftmgram import Client, filters
   from ftmgram.types import Message

   # After
   from ftmgram import Client, filters
   from ftmgram.types import Message

From FTMGram
-------------

.. code-block:: python

   # Before
   from ftmgram import Client, filters
   from ftmgram.types import Message

   # After
   from ftmgram import Client, filters
   from ftmgram.types import Message

Bulk Replace with sed
---------------------

Instantly update all files in your project:

.. code-block:: bash

   # From FTMGram
   find . -name "*.py" -exec sed -i 's/from ftmgram/from ftmgram/g; s/import ftmgram/import ftmgram/g' {} +

   # From FTMGram
   find . -name "*.py" -exec sed -i 's/from ftmgram/from ftmgram/g; s/import ftmgram/import ftmgram/g' {} +

Compatibility Notes
-------------------

.. list-table::
   :widths: 40 60
   :header-rows: 1

   * - Feature
     - Status
   * - All FTMGram methods
     - ✅ Fully supported
   * - All FTMGram types
     - ✅ Fully supported
   * - All FTMGram filters
     - ✅ Fully supported
   * - Session files (``.session``)
     - ✅ Compatible — reuse existing files
   * - Custom filters
     - ✅ No changes needed
   * - Middleware / plugins
     - ✅ No changes needed
   * - Bot API 10.1 (new features)
     - ✅ Only in FTMGram

What's New vs FTMGram
-----------------------

FTMGram adds everything FTMGram is missing:

- **Rich Messages** — ``send_rich_message``, ``send_rich_message_draft``
- **Checklists** — ``append_checklist_tasks``, ``toggle_checklist_task``
- **Link media** — ``MessageMediaType.LINK``, ``Link`` type
- **Join-request queries** — ``answer_chat_join_request_query``
- **Star balance** — ``get_owned_star_count``

See :doc:`../changelog` for the full list.
