예제 #1
0
 /// <summary>
 /// Deletes a message.
 /// <see href="https://api.slack.com/methods/chat.delete" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `chat:write`
 /// </param>
 /// <param name='asUser'>
 /// Pass true to delete the message as the authed user with `chat:write:user`
 /// scope. [Bot users](/bot-users) in this context are considered authed users.
 /// If unused or false, the message will be deleted with `chat:write:bot`
 /// scope.
 /// </param>
 /// <param name='ts'>
 /// Timestamp of the message to be deleted.
 /// </param>
 /// <param name='channel'>
 /// Channel containing the message to be deleted.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DeleteOKResponse> DeleteAsync(this IChat operations, string token = default(string), bool?asUser = default(bool?), string ts = default(string), string channel = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteWithHttpMessagesAsync(token, asUser, ts, channel, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }