Esempio n. 1
0
        public async Task <ActionResult> JoinCoffeeOther([FromForm] SlackCommandDto slackCommand)
        {
            try
            {
                var result = await _slursCommands.Flame(slackCommand.ToCommand());

                return(Ok(result.Message));
            }
            catch (Exception ex)
            {
                return(Ok(string.Format(DougMessages.DougError, ex.Message)));
            }
        }
Esempio n. 2
0
        public async Task MessageReceived(SlackEventData slack)
        {
            if (slack.IsValidCoffeeParrot())
            {
                _coffeeBreakService.CountParrot(slack.User, slack.Channel, DateTime.UtcNow);
            }

            if (slack.ContainsMcdonaldMention())
            {
                Command command = new Command {
                    ChannelId = slack.Channel, UserId = GabId, Text = $"<@{GabId}|gabriel.fillit>"
                };
                await _slurs.Flame(command);
            }
        }
Esempio n. 3
0
        public void MessageReceived(MessageEvent message)
        {
            if (message.IsValidCoffeeParrot())
            {
                _coffeeBreakService.CountParrot(message.User, message.Channel, DateTime.UtcNow);
            }

            if (message.ContainsMcdonaldMention())
            {
                Command command = new Command()
                {
                    ChannelId = message.Channel, UserId = GabId, Text = $"<@{GabId}|gabriel.fillit>"
                };
                _slurs.Flame(command);
            }
        }
Esempio n. 4
0
        public async Task <ActionResult> JoinCoffeeOther([FromForm] SlackCommandDto slackCommand)
        {
            var result = await _slursCommands.Flame(slackCommand.ToCommand());

            return(Ok(result.Message));
        }