private static async Task <(uint, uint, uint, uint)> CreateTestTransactions(DateTime now, [NotNull] IPendingTransactions svc)
        {
            var a = await svc.CreatePending(0, 1, 10, "TEST", "Note 1", now + TimeSpan.FromMinutes(1));

            var b = await svc.CreatePending(0, 1, 1, "TEST2", "Note 3", now + TimeSpan.FromMinutes(3));

            var c = await svc.CreatePending(1, 0, 5, "TEST", "Note 2", now + TimeSpan.FromMinutes(2));

            var d = await svc.CreatePending(1, 2, 5, "TEST3", "Note 4", now + TimeSpan.FromMinutes(3));

            return(a, b, c, d);
        }
示例#2
0
文件: Uoi.cs 项目: Chronojam/Mute
        public async Task CreatePendingUoi([NotNull] IUser user, decimal amount, [NotNull] string unit, [CanBeNull, Remainder] string note = null)
        {
            if (amount < 0)
            {
                await TypingReplyAsync("You cannot owe a negative amount!");
            }

            var id = await _pending.CreatePending(Context.User.Id, user.Id, amount, unit, note, DateTime.UtcNow);

            var fid = new FriendlyId32(id).ToString();

            await TypingReplyAsync($"{user.Mention} type `!confirm {fid}` to confirm that you owe this");
            await TypingReplyAsync($"{user.Mention} type `!deny {fid}` to deny that you owe this. Please talk to the other user about why!");
        }
示例#3
0
文件: UOI.cs 项目: martindevans/Mute
        public async Task CreatePendingUoi(IUser user, decimal amount, string unit, [Remainder] string?note = null)
        {
            if (amount < 0)
            {
                await RespondAsync("You cannot owe a negative amount!");
            }
            else
            {
                var id = await _pending.CreatePending(Context.User.Id, user.Id, amount, unit, note, DateTime.UtcNow);

                var fid = new BalderHash32(id).ToString();

                await RespondAsync($"{user.Mention} type `/confirm {fid}` to confirm that you owe this");
                await FollowupAsync($"{user.Mention} type `/deny {fid}` to deny that you owe this. Please talk to the other user about why!");
            }
        }