private void ProcessSwapSides() { if (Match.IsLive) { MatchSwapSidesEventArgs swapSidesEventArgs = new MatchSwapSidesEventArgs { Guild = Manager.Guild, TName = Match.TName, CTName = Match.CTName, TScore = Match.TScore, CTScore = Match.CTScore, TimeStamp = DateTime.UtcNow.AddHours(Config.TimeZoneOffset), ServerId = ID }; OnSwapSides(swapSidesEventArgs); } }
private void OnSwapSides(MatchSwapSidesEventArgs swapSidesEventArgs) { MatchSwapSidesEventArgs?.Invoke(this, swapSidesEventArgs); }
private async void CsServerSwapSidesAsync(object sender, MatchSwapSidesEventArgs e) { var notification = await GetChannelAsync(e.Guild, ChannelNames.Notifications) as ISocketMessageChannel; await notification.SendMessageAsync($"[{e.ServerId}] {MentionUtils.MentionRole((await GetRoleAsync(e.Guild, RoleNames.Broadcast) as IRole).Id)} Teams have swapped sides {e.CTName} ({e.CTScore}) - {e.TName} ({e.TScore}) - {e.TimeStamp.ToString("HH:mm:ss")}"); }