Esempio n. 1
0
 /// <summary>
 /// Edits a followup message for an Interaction
 /// See <a href="https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message">Edit Followup Message</a>
 /// </summary>
 /// <param name="client">Client to use</param>
 /// <param name="messageId">Message ID of the follow up message</param>
 /// <param name="edit">Updated message</param>
 /// <param name="callback">Callback with the updated message</param>
 /// <param name="error">Callback when an error occurs with error information</param>
 public void EditFollowUpMessage(DiscordClient client, Snowflake messageId, CommandFollowupUpdate edit, Action <DiscordMessage> callback = null, Action <RestError> error = null)
 {
     if (!messageId.IsValid())
     {
         throw new InvalidSnowflakeException(nameof(messageId));
     }
     client.Bot.Rest.DoRequest($"/webhooks/{ApplicationId}/{Token}/messages/{messageId}", RequestMethod.PATCH, edit, callback, error);
 }
Esempio n. 2
0
 /// <summary>
 /// Edits a followup message for an Interaction
 /// See <a href="https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message">Edit Followup Message</a>
 /// </summary>
 /// <param name="client">Client to use</param>
 /// <param name="messageId">Message ID of the follow up message</param>
 /// <param name="edit">Updated message</param>
 /// <param name="callback">Callback with the updated message</param>
 /// <param name="error">Callback when an error occurs with error information</param>
 public void EditFollowUpMessage(DiscordClient client, Snowflake messageId, CommandFollowupUpdate edit, Action <DiscordMessage> callback = null, Action <RestError> error = null)
 {
     client.Bot.Rest.DoRequest($"/webhooks/{ApplicationId}/{Token}/messages/{messageId}", RequestMethod.PATCH, edit, callback, error);
 }