protected override async Task <bool> HandleRequest(PostRequest request) { if (request.Message.ToLower().StartsWith(GiphyPrefix)) { string searchFor = request.Message.Substring(GiphyPrefix.Length); string url = m_GiphyClient.Translate(searchFor); m_PictureBoxPostSentPhoto.Load(url); DialogResult res = MessageBox.Show("Do you want to post it?", "Interesting...", MessageBoxButtons.YesNo); if (res == DialogResult.Yes) { await FacebookApiClient.Instance.PostPictureURLAsync(url, searchFor); request.RequestResult = "Gif Posted successfully!"; } return(false); } return(true); }
protected abstract Task <bool> HandleRequest(PostRequest request);