Example #1
0
        private async Task HandleMessageForGuild(CommandContext context, SocketUserMessage message, char prefix)
        {
            bool allowedToRespond = await context.AllowedToRespond();

            if (!allowedToRespond)
            {
                return;
            }

            var argPos = 0;

            if (!HasPrefix(message, prefix, ref argPos))
            {
                var textResponse = await wordResponseLogic.HandleText(message.Content.ToLower());

                if (textResponse != null)
                {
                    await HandleTextResponse(context, textResponse);
                }
            }
            else
            {
                await HandleCommands(context, message, argPos);
            }
        }