Beispiel #1
0
        public async Task AcceptReportAsync(OrikivoCommandContext ctx, OldGlobal g, ulong id)
        {
            if (g.TryGetReport(id, out Report report))
            {
                OldAccount a = ctx.Data.GetOrAddAccount(report.Author.Id);
                await g.AcceptReport(a, ctx, id);

                ctx.Data.Update(a);
                ctx.Data.Update(g);
            }
        }
Beispiel #2
0
        public async Task GetReportAsync(OldGlobal g, ulong id)
        {
            OldAccount a = Context.Account;

            if (g.TryGetReport(id, out Report r))
            {
                await ReplyAsync(embed : r.Generate(a).Build());

                return;
            }

            Embed e = EmbedData.Throw(Context, "Invalid report.", $"R({id}) could not be found in the report collection.", false);

            await ReplyAsync(embed : e);
        }