/// <summary> /// Modify a guild scheduled event. /// Returns the modified <see cref="GuildScheduledEvent">guild scheduled event</see> object on success. /// See <a href="https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event">Modify Guild Scheduled Event</a> /// </summary> /// <param name="client">Client to use</param> /// <param name="guildId">Guild to modify event in</param> /// <param name="eventId">Id of the event to update</param> /// <param name="update">Guild Scheduled Event to update</param> /// <param name="callback">Callback with the updated scheduled events</param> /// <param name="error">Callback when an error occurs with error information</param> public void Modify(DiscordClient client, Snowflake guildId, Snowflake eventId, ScheduledEventUpdate update, Action <GuildScheduledEvent> callback = null, Action <RestError> error = null) { client.Bot.Rest.DoRequest($"/guilds/{guildId}/scheduled-events/{eventId}", RequestMethod.PATCH, update, callback, error); }
/// <summary> /// Modify a guild scheduled event. /// Returns the modified <see cref="GuildScheduledEvent">guild scheduled event</see> object on success. /// See <a href="https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event">Modify Guild Scheduled Event</a> /// </summary> /// <param name="client">Client to use</param> /// <param name="guildId">Guild to modify event in</param> /// <param name="eventId">Id of the event to update</param> /// <param name="update">Guild Scheduled Event to update</param> /// <param name="callback">Callback with the updated scheduled events</param> /// <param name="error">Callback when an error occurs with error information</param> public void Modify(DiscordClient client, Snowflake guildId, Snowflake eventId, ScheduledEventUpdate update, Action <GuildScheduledEvent> callback = null, Action <RestError> error = null) { if (!guildId.IsValid()) { throw new InvalidSnowflakeException(nameof(guildId)); } if (!eventId.IsValid()) { throw new InvalidSnowflakeException(nameof(eventId)); } client.Bot.Rest.DoRequest($"/guilds/{guildId}/scheduled-events/{eventId}", RequestMethod.PATCH, update, callback, error); }