private async Task SetPage(int value) { if (value < FirstPage) { value = FirstPage; } if (value > LastPage) { value = LastPage; } if (Page == value) { return; // Do nothing if the page didn't change } _page = value; currentPage = await BuildPage(); await ShowCurrentPage(); }
/// <summary>Change the message associated with this PageFlipMessage</summary> protected async Task SetMessage(MessageContents contents) { await message.ModifyAsync(contents.text, contents.embed); }