示例#1
0
        public Task <IGameObserver> GetInstanceForMatchAsync(IMatch match)
        {
            if (ShouldJoin(match))
            {
                Task.Factory.StartNew(async() =>
                {
                    await Task.Delay(TimeSpan.FromSeconds(2));
                    var rotation = await DecksiteApi.GetRotationAsync();
                    match.SendChat($"Penny Dreadful rotates in {rotation.FriendlyDiff}!  Get hyped!");
                }).GetAwaiter();
                return(Task.FromResult <IGameObserver>(this));
            }

            return(Task.FromResult <IGameObserver>(null));
        }
示例#2
0
        public async Task <string> RunAsync(string player, IMatch game, string[] args)
        {
            var rotation = await DecksiteApi.GetRotationAsync();

            return($"[sU]The next rotation is in {rotation.FriendlyDiff}");
        }