Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 private void OnSwapSides(MatchSwapSidesEventArgs swapSidesEventArgs)
 {
     MatchSwapSidesEventArgs?.Invoke(this, swapSidesEventArgs);
 }
Esempio n. 3
0
        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")}");
        }