added botonguild api endpoint

This commit is contained in:
Toastie 2024-10-17 16:50:12 +13:00
parent 43f20cbbc2
commit c3ea830d7b
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
2 changed files with 22 additions and 1 deletions
src/EllieBot/Services/GrpcApi

View file

@ -39,6 +39,19 @@ public sealed class OtherSvc : GrpcOther.GrpcOtherBase, IEService
_cache = cache;
}
[GrpcNoAuthRequired]
public override async Task<BotOnGuildReply> BotOnGuild(BotOnGuildRequest request, ServerCallContext context)
{
var guild = await _client.GetGuildAsync(request.GuildId);
var reply = new BotOnGuildReply
{
Success = guild is not null
};
return reply;
}
public override async Task<GetTextChannelsReply> GetTextChannels(
GetTextChannelsRequest request,
ServerCallContext context)