Dice are also being sent from memory now.
This commit is contained in:
parent
654099afa4
commit
18213b6634
@ -7,6 +7,7 @@ using Discord.Commands;
|
||||
using Discord.Modules;
|
||||
using Discord;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
namespace NadekoBot
|
||||
{
|
||||
@ -37,8 +38,7 @@ namespace NadekoBot
|
||||
}
|
||||
|
||||
Bitmap bitmap = ImageHandler.MergeImages(images);
|
||||
bitmap.Save("dices.png");
|
||||
await client.SendFile(e.Channel, "dices.png");
|
||||
await client.SendFile(e.Channel, "dice.png", ImageHandler.ImageToStream(bitmap, ImageFormat.Png));
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -73,9 +73,8 @@ namespace NadekoBot
|
||||
}
|
||||
|
||||
Bitmap bitmap = ImageHandler.MergeImages(dices.ToArray());
|
||||
bitmap.Save("dices.png");
|
||||
await client.SendMessage(e.Channel, values.Count + " Dies rolled. Total: **"+values.Sum()+"** Average: **"+(values.Sum()/(1.0f*values.Count)).ToString("N2")+"**");
|
||||
await client.SendFile(e.Channel, "dices.png");
|
||||
await client.SendFile(e.Channel, "dices.png", ImageHandler.ImageToStream(bitmap, ImageFormat.Png));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
@ -45,7 +45,6 @@ namespace NadekoBot.Modules
|
||||
//m sh - shuffle songs
|
||||
//m pl - current playlist
|
||||
|
||||
|
||||
public override void Install(ModuleManager manager)
|
||||
{
|
||||
var client = NadekoBot.client;
|
||||
|
Loading…
Reference in New Issue
Block a user