示例#1
0
        /// <summary>
        /// Gets the caller's active character and returns the result.
        /// </summary>
        /// <param name="callerId">Discord ID of the caller.</param>
        /// <returns>A new CharacterResult object.</returns>
        public async Task <IResult> ShowStatisticsAsync(ulong callerId)
        {
            var character = await _charProvider.GetActiveCharacterAsync(callerId);

            if (character == null)
            {
                return(CharacterResult.CharacterNotFound());
            }

            if (character.Statistics == null || character.Statistics.Count <= 0)
            {
                return(StatisticResult.StatisticNotFound());
            }

            return(StatisticResult.ShowCharacter(character, await _strategy.GetCharacterStatisticsInfo(character)));
        }