private void ProcessMatchStarting(CsMatch match) { Match.CtSwapScore = 0; Match.TSwapScore = 0; Match.TScore = 0; Match.CTScore = 0; MatchStartEventArgs args = new MatchStartEventArgs { MapName = match.MapName, CTName = match.CTName, Guild = Manager.Guild, TName = match.TName, ServerId = ID, TimeStamp = DateTime.UtcNow.AddHours(Config.TimeZoneOffset), }; OnMatchLive(args); }
private void OnMatchLive(MatchStartEventArgs e) { MatchStartEventArgs?.Invoke(this, e); }
private async void CsServerMatchLiveAsync(object sender, MatchStartEventArgs 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)} Match is now live on {e.MapName} - {e.TimeStamp.ToString("HH:mm:ss")}"); }