ilyalatt / Telega

C# Telegram MTProto Client
https://ilyalatt.github.io/Telega/
MIT License
58 stars 15 forks source link

Can't generate dtos from new layer schema #88

Closed AqlaSolutions closed 1 year ago

AqlaSolutions commented 1 year ago

The generator creates non-compilable code. This makes impossible usage of this project though it looks better than others in terms of code quality.

ablearthy commented 1 year ago

That's because Layer 160, for example, contains flags2 (Layer 136 does not) and, therefore, it generates some nonsense: public T.Flags2.1?true BotCanEdit { get; }

ablearthy commented 1 year ago

And here's another problem:

botMenuButtonDefault#7533a588 = BotMenuButton;
botMenuButtonCommands#4258c205 = BotMenuButton;
botMenuButton#c7b57ce6 text:string url:string = BotMenuButton;

It generates class BotMenuButton that contains sub-classes DefaultTag, CommandsTag and... DefaultTag

ablearthy commented 1 year ago

And also there's name collision with C# keywords: forumTopic#71701da9 ... short:flags.5?true ... = ForumTopic;. The constructor contains parameter of kind bool short