Ejemplo n.º 1
0
 /*public static Task<IUserMessage> ReplyBitmapAsync<T>(this ModuleBase<T> module, Bitmap bitmap, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null)
  *      where T : class, ICommandContext
  * {
  *      return module.ReplyBitmapAsync(bitmap, ImageFormat.Png, filename, text, isTTS, embed, options);
  * }
  * public static Task<IUserMessage> ReplyBitmapAsync<T>(this ModuleBase<T> module, Bitmap bitmap, ImageFormat format, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null)
  *      where T : class, ICommandContext
  * {
  *      using (var stream = new MemoryStream()) {
  *              bitmap.Save(stream, format);
  *              return module.Context.Channel.SendFileAsync(stream, filename, text, isTTS, embed, options);
  *      }
  * }
  *
  */
 public static Task <IUserMessage> SendBitmapAsync(this IMessageChannel channel, Bitmap bitmap, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null)
 {
     return(channel.SendBitmapAsync(bitmap, ImageFormat.Png, filename, text, isTTS, embed, options));
 }