Esempio n. 1
0
        public async Task ReplyAsync(SocketCommandContext context, string message)
        {
            if (message.Length < 2)
            {
                return;
            }

            var typing = responseService.StartTypingAsync(context);

            var delay = Task.Delay(500);
            var reply = await ChatSystem.ReplyAsync(message);

            //reply = UwuTranslator.Translate(reply);
            reply = reply.SliceBack(1900);

            await delay;

            await responseService.SendToContextAsync(context, reply, typing);

            if (context.IsPrivate && context.User.Id != ApplicationContext.BotOwner.Id)
            {
                await responseService.SendToChannelAsync(discordLogger.LogChannel, "DM chat received:", new EmbedBuilder()
                                                         .WithAuthor(context.User)
                                                         .WithDescription(message)
                                                         .AddField("Response", reply)
                                                         .Build());
            }
        }