/// <summary> /// Posts a new announcement message /// </summary> /// <param name="embed">Message to post</param> /// <returns>No object or value is returned by this method when it completes.</returns> private async Task PostAnnounce(Discord.Embed embed) { var announceIDKeyValue = await DataBaseUtil.GetKeyValueAsync("AnnounceID"); var announceNameKeyValue = await DataBaseUtil.GetKeyValueAsync("AnnounceName"); AnnounceMessage = await _dataService.AnnouncementChannel.SendMessageAsync("", false, embed) as IUserMessage; await GetAlbum(); //If data exists, just delete it so it can be remade with the new test info. if (announceIDKeyValue != null) { await DataBaseUtil.DeleteKeyValueAsync(announceIDKeyValue); await DataBaseUtil.DeleteKeyValueAsync(announceNameKeyValue); announceNameKeyValue = null; announceIDKeyValue = null; } //Create the text file containing the announce message if (announceIDKeyValue == null) { await DataBaseUtil.AddKeyValueAsync("AnnounceID", $"{AnnounceMessage.Id}"); await DataBaseUtil.AddKeyValueAsync("AnnounceName", CurrentEventInfo[2]); } await _dataService.ChannelLog("Posting Playtest Announcement", $"Posting Playtest for {CurrentEventInfo[2]}"); LastEventInfo = CurrentEventInfo; }