Add Image property to Guild Scheduled Events (#2151)

* Add Image property to create and modify events

* Add CDN routes to get cover image

* Update banner names

* Update CDN.cs

* Update IGuildScheduledEvent.cs
This commit is contained in:
Quin Lynch
2022-03-02 19:22:08 -04:00
committed by GitHub
parent 202554fdde
commit 1dc473c7e4
12 changed files with 74 additions and 8 deletions

View File

@@ -1167,6 +1167,7 @@ namespace Discord.Rest
/// </param>
/// <param name="speakers">A collection of speakers for the event.</param>
/// <param name="location">The location of the event; links are supported</param>
/// <param name="coverImage">The optional banner image for the event.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// A task that represents the asynchronous create operation.
@@ -1180,8 +1181,9 @@ namespace Discord.Rest
DateTimeOffset? endTime = null,
ulong? channelId = null,
string location = null,
Image? coverImage = null,
RequestOptions options = null)
=> GuildHelper.CreateGuildEventAsync(Discord, this, name, privacyLevel, startTime, type, description, endTime, channelId, location, options);
=> GuildHelper.CreateGuildEventAsync(Discord, this, name, privacyLevel, startTime, type, description, endTime, channelId, location, coverImage, options);
#endregion
@@ -1198,8 +1200,8 @@ namespace Discord.Rest
IReadOnlyCollection<ICustomSticker> IGuild.Stickers => Stickers;
/// <inheritdoc />
async Task<IGuildScheduledEvent> IGuild.CreateEventAsync(string name, DateTimeOffset startTime, GuildScheduledEventType type, GuildScheduledEventPrivacyLevel privacyLevel, string description, DateTimeOffset? endTime, ulong? channelId, string location, RequestOptions options)
=> await CreateEventAsync(name, startTime, type, privacyLevel, description, endTime, channelId, location, options).ConfigureAwait(false);
async Task<IGuildScheduledEvent> IGuild.CreateEventAsync(string name, DateTimeOffset startTime, GuildScheduledEventType type, GuildScheduledEventPrivacyLevel privacyLevel, string description, DateTimeOffset? endTime, ulong? channelId, string location, Image? coverImage, RequestOptions options)
=> await CreateEventAsync(name, startTime, type, privacyLevel, description, endTime, channelId, location, coverImage, options).ConfigureAwait(false);
/// <inheritdoc />
async Task<IGuildScheduledEvent> IGuild.GetEventAsync(ulong id, RequestOptions options)