mirror of
https://onedev.fprog.nl/DiscordClient
synced 2026-04-27 15:54:10 +02:00
Formatting.
This commit is contained in:
parent
e717332b12
commit
53f34368bd
|
|
@ -54,11 +54,13 @@ public class DiscordUserClient
|
|||
return await _httpClient.DeleteAsync(url);
|
||||
}
|
||||
|
||||
public async Task<GuildMessageSearchResponse?> SearchGuildMessages(string guildId, string? authorId = null)
|
||||
public async Task<GuildMessageSearchResponse?> SearchGuildMessages(
|
||||
string guildId,
|
||||
string? authorId = null
|
||||
)
|
||||
{
|
||||
string authorQuery = authorId is not null ? $"?author_id={authorId}" : "";
|
||||
string url =
|
||||
$"https://discord.com/api/v9/guilds/{guildId}/messages/search{authorQuery}";
|
||||
string url = $"https://discord.com/api/v9/guilds/{guildId}/messages/search{authorQuery}";
|
||||
HttpResponseMessage response = await _httpClient.GetAsync(url);
|
||||
return await response.Content.ReadFromJsonAsync<GuildMessageSearchResponse>();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue