Example #1
0
        public async Task Recent([Remainder] string arg = "")
        {
            OsuArg osuDiscordArg = null;

            try
            {
                osuDiscordArg = new OsuArg(arg, false);
            }
            catch (CakeException e)
            {
                await Context.Channel.SendMessageAsync(e.Message);
            }
            catch (Exception e)
            {
                _logger.LogException(e);
            }

            await _service.GetUserRecent(osuDiscordArg.GetUserId(), osuDiscordArg.UseUsername());

            var mapId = GetMapId();

            if (mapId != null)
            {
                await SaveMapId(Context.Channel.Id, Context.Guild.Id, (int)mapId);
            }
        }
Example #2
0
        public async Task GetCompare([Remainder] string arg = "")
        {
            OsuArg osuDiscordArg = null;

            try
            {
                osuDiscordArg = new OsuArg(arg, false);
            }
            catch (CakeException e)
            {
                await Context.Channel.SendMessageAsync(e.Message);
            }
            catch (Exception e)
            {
                _logger.LogException(e);
            }

            await _service.GetCompare(osuDiscordArg.GetUserId(), osuDiscordArg.UseUsername());
        }
Example #3
0
        public async Task GetUserBestDUser(IGuildUser user, [Remainder] string arg = "")
        {
            OsuArg osuDiscordArg = null;

            try
            {
                osuDiscordArg = new OsuArg(arg, true);
            }
            catch (CakeException e)
            {
                await Context.Channel.SendMessageAsync(e.Message);
            }
            catch (Exception e)
            {
                _logger.LogException(e);
            }

            if (osuDiscordArg != null)
            {
                await _service.GetUserBest("", false, osuDiscordArg.IsRecent(), osuDiscordArg.GetPlayNumber(), true, user.Id);
            }
        }