public async Task Delete(int numToDelete) { DeleteMessageService deleteservice = new DeleteMessageService(); IEnumerable <IMessage> messages; messages = await deleteservice.DownloadMessagesAsync(Context, numToDelete); await deleteservice.DeleteMessages(Context, messages); }
public async Task Delete(int numToDelete, [Remainder] string stringIn) { DeleteMessageService deleteservice = new DeleteMessageService(); IEnumerable <IMessage> messages; await deleteservice.ParseDeleteCommandAsync(Context, stringIn); if (await deleteservice.CheckParamConflict()) { await ReplyAsync("error: parameter conflict"); return; } else { messages = await deleteservice.DownloadMessagesAsync(Context, numToDelete); } await deleteservice.DeleteMessages(Context, messages); } // end delete