reworked the commandHandler
added Slash Commands
This commit is contained in:
parent
17dceda408
commit
b8feed971c
15 changed files with 599 additions and 214 deletions
|
@ -125,5 +125,21 @@ namespace DiscordBot.Services
|
|||
return new Tuple<bool, string>(true, string.Empty);
|
||||
}
|
||||
|
||||
public async Task<ApiRaid> GetRaid(int raidId)
|
||||
{
|
||||
var httpClient = _httpClientFactory.CreateClient(Constants.HTTP_CLIENT_NAME);
|
||||
|
||||
var httpResponseMessage = await httpClient.GetAsync($"DiscordBot/GetRaid/{raidId}");
|
||||
|
||||
if (httpResponseMessage.IsSuccessStatusCode)
|
||||
{
|
||||
using var contentStream =
|
||||
await httpResponseMessage.Content.ReadAsStreamAsync();
|
||||
|
||||
return await JsonSerializer.DeserializeAsync<ApiRaid>(contentStream, _serializerOptions);
|
||||
}
|
||||
return new ApiRaid();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue