go-telegram / go-telegram/bot

Refactor inline query handling by introducing a dedicated HandlerTypeInlineQuery

Open
#293 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.8k
Forks
161
Avg merge
2d 17h
Merged PRs (30d)
3

Description

Description

Currently, the sample implementation for handling inline queries provided in the examples/ directory feels messy. Treating inline queries without a explicit, dedicated handler type makes the code harder to maintain and less idiomatic.

Proposed Solution

To provide a cleaner API and a more logical developer experience, I propose introducing a dedicated HandlerType specifically for inline query interactions.

Key Changes:
  1. Add HandlerTypeInlineQuery: Define a new HandlerType constant specifically for inline queries.
  2. Update Routing Logic: Add a new case for HandlerTypeInlineQuery inside the internal match function to handle inline query routing properly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the HandlerType definitions and the internal match function described in the issue, then trace how the existing inline-query handling is routed. Done means a dedicated HandlerTypeInlineQuery exists and the match logic routes inline queries through its new case without relying on the current implicit handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend-api-design
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.