Added ~clr back
This commit is contained in:
		| @@ -203,7 +203,7 @@ $@"🌍 **Weather for** 【{obj["target"]}】 | |||||||
|             await channel.SendMessageAsync($"https://google.com/search?q={ WebUtility.UrlEncode(terms).Replace(' ', '+') }") |             await channel.SendMessageAsync($"https://google.com/search?q={ WebUtility.UrlEncode(terms).Replace(' ', '+') }") | ||||||
|                            .ConfigureAwait(false); |                            .ConfigureAwait(false); | ||||||
|         } |         } | ||||||
|         //todo drawing |  | ||||||
|         [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] |         [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] | ||||||
|         [RequireContext(ContextType.Guild)] |         [RequireContext(ContextType.Guild)] | ||||||
|         public async Task Hearthstone(IUserMessage umsg, [Remainder] string name = null) |         public async Task Hearthstone(IUserMessage umsg, [Remainder] string name = null) | ||||||
| @@ -403,31 +403,25 @@ $@"🌍 **Weather for** 【{obj["target"]}】 | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         ////todo drawing |         [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] | ||||||
|         //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] |         [RequireContext(ContextType.Guild)] | ||||||
|         //[RequireContext(ContextType.Guild)] |         public async Task Clr(IUserMessage umsg, [Remainder] string color = null) | ||||||
|         //public async Task Clr(IUserMessage umsg, [Remainder] string color = null) |         { | ||||||
|         //{ |             var channel = (ITextChannel)umsg.Channel; | ||||||
|         //    var channel = (ITextChannel)umsg.Channel; |  | ||||||
|  |  | ||||||
|         //    color = color?.Trim().Replace("#", ""); |             color = color?.Trim().Replace("#", ""); | ||||||
|         //    if (string.IsNullOrWhiteSpace((string)color)) |             if (string.IsNullOrWhiteSpace((string)color)) | ||||||
|         //        return; |                 return; | ||||||
|         //    var img = new Bitmap(50, 50); |             var img = new Image(50, 50); | ||||||
|  |  | ||||||
|         //    var red = Convert.ToInt32(color.Substring(0, 2), 16); |             var red = Convert.ToInt32(color.Substring(0, 2), 16); | ||||||
|         //    var green = Convert.ToInt32(color.Substring(2, 2), 16); |             var green = Convert.ToInt32(color.Substring(2, 2), 16); | ||||||
|         //    var blue = Convert.ToInt32(color.Substring(4, 2), 16); |             var blue = Convert.ToInt32(color.Substring(4, 2), 16); | ||||||
|         //    var brush = new SolidBrush(System.Drawing.Color.FromArgb(red, green, blue)); |  | ||||||
|  |  | ||||||
|         //    using (Graphics g = Graphics.FromImage(img)) |             img.BackgroundColor(new ImageProcessorCore.Color(color)); | ||||||
|         //    { |  | ||||||
|         //        g.FillRectangle(brush, 0, 0, 50, 50); |  | ||||||
|         //        g.Flush(); |  | ||||||
|         //    } |  | ||||||
|  |  | ||||||
|         //    await channel.SendFileAsync("arg1.png", img.ToStream()); |             await channel.SendFileAsync(img.ToStream(), $"{color}.png"); | ||||||
|         //} |         } | ||||||
|  |  | ||||||
|         [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] |         [LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] | ||||||
|         [RequireContext(ContextType.Guild)] |         [RequireContext(ContextType.Guild)] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user