Closed Potion837 closed 2 weeks ago
The changes in this pull request involve significant modifications to the YounBot
application, particularly in the Program.cs
, YounBot.csproj
, and the introduction of a new QrCodeLogin.cs
file. The Program.cs
file has been updated to change the Main
method's signature to an asynchronous version and to streamline the configuration handling. The YounBot.csproj
file now treats appsettings.json
as an embedded resource. Additionally, a new static class for QR code login functionality has been introduced, enhancing the login process.
File | Change Summary |
---|---|
Program.cs | Changed Main method to public static async; updated resource path for appsettings.json ; removed message for missing config file; simplified instantiation of YounBotAppBuilder . |
YounBot.csproj | Modified build action for appsettings.json to include it as an embedded resource. |
Login/QrCodeLogin.cs | Introduced a new static class QrCodeLogin with an asynchronous Login method for bot login. |
YounBotApp.cs | Updated constructor to accept YounBotAppBuilder directly; removed Services property; added Client field. |
YounBotAppBuilder.cs | Simplified constructor to accept only IConfiguration ; added methods to retrieve device info, keystore, and config. |
sequenceDiagram
participant User
participant YounBot
participant Config
participant QrCodeLogin
User->>YounBot: Start Application
YounBot->>Config: Check appsettings.json
alt File Found
Config-->>YounBot: Load Configuration
YounBot->>QrCodeLogin: Initiate Login
QrCodeLogin-->>YounBot: Login Successful
else File Not Found
YounBot-->>User: No config file found
YounBot->>Config: Load default settings
end
🐇 "In the code where the settings reside,
A path was changed, a message denied.
From 'no config' to a resource so neat,
YounBot hops on, with changes complete!
Embedded now, the settings align,
A smoother start, oh how divine!" 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Chores