コード例 #1
0
        public static string ClearTrade(ulong userID)
        {
            QueueExtensions.GetPosition(userID, out var order);
            if (order == null)
            {
                return("Sorry, you are not in the queue, or your order is happening now.");
            }

            order.SkipRequested = true;
            return("Your order has been removed. Please note that you will not be able to rejoin the queue again for a while.");
        }
コード例 #2
0
        public static string GetPosition(ulong userID)
        {
            var position = QueueExtensions.GetPosition(userID, out var order);

            if (order == null)
            {
                return("Sorry, you are not in the queue, or your order is happening now.");
            }

            var message = $"You are in the order queue. Position: {position}.";

            if (position > 1)
            {
                message += $" Your predicted ETA is {QueueExtensions.GetETA(position)}.";
            }

            return(message);
        }