-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSake.cs
56 lines (47 loc) · 1.11 KB
/
Sake.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System.Collections.Specialized;
using MikuBot.Commands;
using MikuBot.Modules;
namespace MikuBot.ExtraPlugins
{
public class Sake : MsgCommandModuleBase
{
private readonly StringCollection responses = new StringCollection {
"zzzzzz",
"whaddaya mean I can't have more sake?",
"cheers!",
"here please!",
"come here pretty... *waves at MikuB0t*",
};
public override int CooldownChannelMs
{
get { return 30000; }
}
public override string HelpText
{
get { return "Sake!"; }
}
public override InitialModuleStatus InitialStatus
{
get { return InitialModuleStatus.Disabled; }
}
public override bool IsPassive
{
get { return true; }
}
public override void HandleCommand(MsgCommand chat, IBotContext bot)
{
var txt = chat.Text.ToLower();
if (txt.Contains("sake") && (!responses.Contains(txt) || chat.HighlightMe))
{
if (!CheckCooldowns(chat, bot, false))
return;
var output = BotHelper.ChooseRandom(responses);
bot.Writer.Msg(chat.ChannelOrSenderNick, output);
}
}
public override string Name
{
get { return "Sake"; }
}
}
}