Browse Source

fix failed to generate buket id

pull/2395/head
Cenngo 2 years ago
parent
commit
fd82ee3d76
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/Discord.Net.Rest/DiscordRestApiClient.cs

+ 4
- 2
src/Discord.Net.Rest/DiscordRestApiClient.cs View File

@@ -1226,7 +1226,8 @@ namespace Discord.API
}

//with_localizations=false doesnt return localized names and descriptions
return await SendAsync<ApplicationCommand[]>("GET", () => $"applications/{CurrentApplicationId}/commands{(withLocalizations ? "?with_localizations=true" : string.Empty)}",
var query = withLocalizations ? "?with_localizations=true" : string.Empty;
return await SendAsync<ApplicationCommand[]>("GET", () => $"applications/{CurrentApplicationId}/commands{}",
new BucketIds(), options: options).ConfigureAwait(false);
}

@@ -1307,7 +1308,8 @@ namespace Discord.API
}

//with_localizations=false doesnt return localized names and descriptions
return await SendAsync<ApplicationCommand[]>("GET", () => $"applications/{CurrentApplicationId}/commands{(withLocalizations ? "?with_localizations=true" : string.Empty)}",
var query = withLocalizations ? "?with_localizations=true" : string.Empty;
return await SendAsync<ApplicationCommand[]>("GET", () => $"applications/{CurrentApplicationId}/commands{query}",
bucket, options: options).ConfigureAwait(false);
}



Loading…
Cancel
Save