gretmn102 / gretmn102/WinniePoohBot

feat: добавить форматирование

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Встроенные режимы форматирования

### Бесформатный (это сейчас такой)

Умеет только упоминать пользователей через `@username`.

### Markdown (legacy)

```md
*bold text*
_italic text_
[inline URL](http://www.example.com/)
[inline mention of a user](tg://user?id=123456789)
`inline fixed-width code`
```plain
pre-formatted fixed-width code block```

```python
pre-formatted fixed-width code block written in the Python programming language```
```

Источник: https://core.telegram.org/bots/api#markdown-style

### MarkdownV2

```md
__курсив__
**жирный**
~~зачеркнутый~~
`inline code`
||спойлер||

```js
console.log("Hello World!");```

> Цитата

[inline URL](http://www.example.com/)

[Это Агент](tg://user?id=123456789)
```

Источник: https://core.telegram.org/bots/api#markdownv2-style

### HTML

```html
bold, bold
italic, italic
underline, underline
strikethrough, strikethrough, strikethrough
spoiler, spoiler
bold italic bold italic bold strikethrough italic bold strikethrough spoiler underline italic bold bold
inline URL
inline mention of a user
👍
inline fixed-width code

pre-formatted fixed-width code block

pre-formatted fixed-width code block written in the Python programming language

Block quotation started\nBlock quotation continued\nThe last line of the block quotation

Expandable block quotation started\nExpandable block quotation continued\nExpandable block quotation continued\nHidden by default part of the block quotation started\nExpandable block quotation continued\nThe last line of the block quotation

```

Источник: https://core.telegram.org/bots/api#html-style

### ?

Ах да, у Телеги есть такой прикол, что если включить режим форматирования (там есть два режима: упоротый MarkdownV2 и HTML), то перестает работать `@oreolek`.

Markdown:

```markdown
[${userName}](tg://user?ID=${userId})
```

HTML:

```html
${userName}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files, tests, or entry points are named in the issue. First locate the TypeScript Telegram message-sending path and determine how formatting modes and user mentions are currently selected; done requires an agreed implementation scope covering the listed Markdown, MarkdownV2, and HTML examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.