feat: added DI to Client

This commit is contained in:
Lisoveliy
2025-05-01 20:50:14 +03:00
parent da0ca92795
commit 786c63166c
8 changed files with 149 additions and 42 deletions

View File

@@ -0,0 +1,18 @@
using User = JOBot.Proto.User;
namespace JOBot.TClient.Core.Services;
public class UserService(User.UserClient client)
{
public async Task<bool> RegisterAsync(long userId, string? username)
{
var response = await client.RegisterAsync(new()
{
UserId = userId,
Username = username
});
return response.Success;
}
}