Fixed osu bugs
This commit is contained in:
		@@ -46,8 +46,10 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                        http.AddFakeHeaders();
 | 
			
		||||
                        var res = await http.GetStreamAsync(new Uri($"http://lemmmy.pw/osusig/sig.php?uname={ usr }&flagshadow&xpbar&xpbarhex&pp=2&mode={m}")).ConfigureAwait(false);
 | 
			
		||||
 | 
			
		||||
                        res.Position = 0;
 | 
			
		||||
                        await channel.SendFileAsync(res, $"{usr}.png", $"`Profile Link:`https://osu.ppy.sh/u/{Uri.EscapeDataString(usr)}\n`Image provided by https://lemmmy.pw/osusig`").ConfigureAwait(false);
 | 
			
		||||
                        MemoryStream ms = new MemoryStream();
 | 
			
		||||
                        res.CopyTo(ms);
 | 
			
		||||
                        ms.Position = 0;
 | 
			
		||||
                        await channel.SendFileAsync(ms, $"{usr}.png", $"`Profile Link:`https://osu.ppy.sh/u/{Uri.EscapeDataString(usr)}\n`Image provided by https://lemmmy.pw/osusig`").ConfigureAwait(false);
 | 
			
		||||
                    }
 | 
			
		||||
                    catch (Exception ex)
 | 
			
		||||
                    {
 | 
			
		||||
@@ -96,7 +98,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task Osu5(IUserMessage umsg, string user, [Remainder] string mode)
 | 
			
		||||
            public async Task Osu5(IUserMessage umsg, string user, [Remainder] string mode = null)
 | 
			
		||||
            {
 | 
			
		||||
                var channel = (ITextChannel)umsg.Channel;
 | 
			
		||||
                if (string.IsNullOrWhiteSpace(NadekoBot.Credentials.OsuApiKey))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user