Пример #1
0
        public async Task GDPR(params string[] command)
        {
            await p.DoAction(Context.User, Context.Guild.Id, Program.Module.Information);

            await ReplyAsync("", false, new EmbedBuilder()
            {
                Color       = Color.Blue,
                Title       = Sentences.DataSaved(Context.Guild.Id, Context.Guild.Name),
                Description = await Program.p.db.GetGuild(Context.Guild.Id)
            }.Build());
        }
Пример #2
0
        public async Task GDPR(params string[] command)
        {
            await p.DoAction(Context.User, Program.Module.Information);

            var guildId = Context.Guild == null ? Context.User.Id : Context.Guild.Id;
            var guild   = await Program.p.db.GetGuild(guildId);

            if (guild != null)
            {
                await ReplyAsync("", false, new EmbedBuilder()
                {
                    Color       = Color.Blue,
                    Title       = Sentences.DataSaved(Context.Guild, Context.Guild?.Name ?? Context.User.ToString()),
                    Description = guild
                }.Build());
            }
            var me = Program.p.cm.GetProfile(Context.User.Id);

            if (me != null)
            {
                await Context.User.SendMessageAsync("", false, new EmbedBuilder()
                {
                    Color       = Color.Blue,
                    Title       = "Data saved about you",
                    Description = string.Join(Environment.NewLine, me.GetProfileToDb(Program.p.db.GetR(), true).Select(x => x.Key + ": " + x.Value)),
                    Footer      = new EmbedFooterBuilder
                    {
                        Text = "Achievements progression is kept hidden"
                    }
                }.Build());
            }
            else if (guild == null)
            {
                await ReplyAsync("I don't have any information stored about you.");
            }
        }