Adding new code-generator (Butcher) (#1069)

* Re-generate types

* Re-generate methods (only attributes)

* Added enums

* Base init generator

* Added butcher configs

* Fixed tests, bump butcher

* Added changelog

* Added enum docs

* Added templates for docs index

* Re-generate bot class, remove deprecated methods
This commit is contained in:
Alex Root Junior 2022-11-21 01:06:55 +02:00 committed by GitHub
parent c7779abc50
commit d034c1ba9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
387 changed files with 32036 additions and 3144 deletions

View file

@ -0,0 +1,6 @@
name: ChatType
description: "Type of chat"
parse:
entity: Chat
attribute: type
regexp: "'([a-z]+)'"

View file

@ -0,0 +1,32 @@
name: ContentType
description: "Message content type"
static:
UNKNOWN: unknown
ANY: any
extract:
entity: Message
exclude:
- message_id
- message_thread_id
- from
- sender_chat
- date
- chat
- forward_from
- forward_from_chat
- forward_from_message_id
- forward_signature
- forward_sender_name
- forward_date
- is_topic_message
- is_automatic_forward
- via_bot
- edit_date
- has_protected_content
- media_group_id
- author_signature
- reply_markup
- entities
- caption
- caption_entities
- reply_to_message

9
.butcher/enums/dice.yml Normal file
View file

@ -0,0 +1,9 @@
name: DiceEmoji
description: "Emoji on which the dice throw animation is based"
static:
DICE: 🎲
DART: 🎯
BASKETBALL: 🏀
FOOTBALL:
SLOT_MACHINE: 🎰
BOWLING: 🎳

View file

@ -0,0 +1,13 @@
name: TopicIconColor
description: |
Color of the topic icon in RGB format.
Source: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56
type: int
static:
BLUE: "0x6FB9F0"
YELLOW: "0xFFD67E"
VIOLET: "0xCB86DB"
GREEN: "0x8EEE98"
ROSE: "0xFF93B2"
RED: "0xFB6F5F"

View file

@ -0,0 +1,6 @@
name: UpdateType
description: Known update types
extract:
entity: Update
exclude:
- update_id