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.Modules;
|
||||||
using Discord;
|
using Discord;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
|
||||||
namespace NadekoBot
|
namespace NadekoBot
|
||||||
{
|
{
|
||||||
@ -37,8 +38,7 @@ namespace NadekoBot
|
|||||||
}
|
}
|
||||||
|
|
||||||
Bitmap bitmap = ImageHandler.MergeImages(images);
|
Bitmap bitmap = ImageHandler.MergeImages(images);
|
||||||
bitmap.Save("dices.png");
|
await client.SendFile(e.Channel, "dice.png", ImageHandler.ImageToStream(bitmap, ImageFormat.Png));
|
||||||
await client.SendFile(e.Channel, "dices.png");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -73,9 +73,8 @@ namespace NadekoBot
|
|||||||
}
|
}
|
||||||
|
|
||||||
Bitmap bitmap = ImageHandler.MergeImages(dices.ToArray());
|
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.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)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,6 @@ namespace NadekoBot.Modules
|
|||||||
//m sh - shuffle songs
|
//m sh - shuffle songs
|
||||||
//m pl - current playlist
|
//m pl - current playlist
|
||||||
|
|
||||||
|
|
||||||
public override void Install(ModuleManager manager)
|
public override void Install(ModuleManager manager)
|
||||||
{
|
{
|
||||||
var client = NadekoBot.client;
|
var client = NadekoBot.client;
|
||||||
|
Loading…
Reference in New Issue
Block a user