using Microsoft.AspNetCore.SignalR;

namespace Managing.Application.Hubs;

public class BotHub : Hub
{
    public async override Task OnConnectedAsync()
    {
        await base.OnConnectedAsync();
        await Clients.Caller.SendAsync("Message", "Connected successfully!");
    }

    public async Task SubscribeBots() =>
        await Clients.All.SendAsync("BotsSubscription", "Successfully subscribed");

    public string GetConnectionId() => Context.ConnectionId;
}