add-telegram-update-field

Add fields to Kotlin Telegram Update data class and integrate them across the framework.

247|18|Updated May 26, 2022
One-click install
npx skills add https://github.com/vendelieu/telegram-bot --skill add-telegram-update-field
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-telegram-update-field
Source: https://github.com/vendelieu/telegram-bot/tree/main/.cursor/skills/library-dev/add-telegram-update-field
Command: npx skills add https://github.com/vendelieu/telegram-bot --skill add-telegram-update-field

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of adding support for new Telegram update types to a Kotlin-based Telegram bot framework, ensuring all necessary components are updated consistently.

Core Features & Use Cases

  • Update Field Addition: Guides the developer through adding new fields to the Update data class.
  • Type Registration: Ensures new update types are correctly registered in UpdateType and ProcessedUpdate.
  • KSP Integration: Details how to update the Kotlin Symbol Processing (KSP) module for code generation.
  • Use Case: When Telegram introduces a new feature like chat_boost updates, this Skill provides the exact steps to integrate handling for it into your bot.

Quick Start

Follow the steps outlined in the SKILL.md to add a new field to the Update type.

Frequently Asked Questions about add-telegram-update-field

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new update type to my Kotlin Telegram bot framework?

Adding new fields to a Telegram bot Update involves modifying Update.kt, UpdateType.kt, and ProcessedUpdate.kt, then updating the KSP code generation modules like TypeMapper.kt to ensure seamless framework integration.

How does KSP integration work when extending Telegram bot update handling?

KSP integration for Telegram bot updates requires updating TypeConstants.kt and TypeMapper.kt modules to ensure the Kotlin Symbol Processing code generation correctly maps and handles the newly added Update fields.

When do I need to modify ProcessedUpdate.kt for Telegram bot updates?

You need to modify ProcessedUpdate.kt when introducing new Telegram update kinds like message reactions or chat boosts, ensuring the processed update data class correctly registers and carries the new update type.

Can I use this approach to handle chat_boost and message reaction updates in Kotlin?

Yes, you can use this approach to handle chat_boost and message reaction updates by adding the respective fields to the Update data class and integrating them across the Kotlin Telegram bot framework components.

What is the best way to register a new update kind in a Kotlin Telegram bot library?

The best way to register a new update kind is to consistently update UpdateType alongside the Update data class, and ensure the KSP code generation modules are modified to recognize the new Telegram bot update type.