format fix #380 , now deleting pickup message when random flower spawns after 5 second

This commit is contained in:
Master Kwoth 2016-07-07 10:15:28 +02:00
parent f0c85eaafc
commit c7d61c5d10
3 changed files with 5 additions and 2 deletions

View File

@ -85,7 +85,7 @@ namespace NadekoBot.Modules.Administration.Commands
int i = 1; int i = 1;
foreach (var reaction in items) foreach (var reaction in items)
{ {
message.AppendLine($"[{i++}] " + Format.Code(reaction)); message.AppendLine($"[{i++}] " + Format.Code(Format.Escape(reaction)));
} }
await e.Channel.SendMessage(message.ToString()); await e.Channel.SendMessage(message.ToString());
}); });

View File

@ -42,8 +42,10 @@ namespace NadekoBot.Modules.Games.Commands
if ((rnd % 50) == 0) if ((rnd % 50) == 0)
{ {
var msg = await e.Channel.SendFile(GetRandomCurrencyImagePath()); var msg = await e.Channel.SendFile(GetRandomCurrencyImagePath());
await e.Channel.SendMessage($"❗ A random {NadekoBot.Config.CurrencyName} appeared! Pick it up by typing `>pick`"); var msg2 = await e.Channel.SendMessage($"❗ A random {NadekoBot.Config.CurrencyName} appeared! Pick it up by typing `>pick`");
plantedFlowerChannels.AddOrUpdate(e.Channel.Id, msg, (u, m) => { m.Delete().GetAwaiter().GetResult(); return msg; }); plantedFlowerChannels.AddOrUpdate(e.Channel.Id, msg, (u, m) => { m.Delete().GetAwaiter().GetResult(); return msg; });
await Task.Delay(5000);
await msg2.Delete();
} }
} }
} }

View File

@ -3,6 +3,7 @@
"ForwardMessages": true, "ForwardMessages": true,
"IsRotatingStatus": false, "IsRotatingStatus": false,
"BufferSize": 4194304, "BufferSize": 4194304,
"Quotes": [],
"RemindMessageFormat": "❗⏰**I've been told to remind you to '%message%' now by %user%.**⏰❗", "RemindMessageFormat": "❗⏰**I've been told to remind you to '%message%' now by %user%.**⏰❗",
"CustomReactions": { "CustomReactions": {
"\\o\\": [ "\\o\\": [