-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTTV.cs
40 lines (36 loc) · 1.17 KB
/
TTV.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
using BBRAPIModules;
using System.Threading.Tasks;
namespace BBRModules
{
[Module("A module to mess with TTVs.", "1.0.0")]
public class TTV : BattleBitModule
{
public static TTVConfig Configuration { get; set; } = null!;
public override async Task OnPlayerConnected(RunnerPlayer player)
{
if (!player.Name.ToLower().Contains("ttv"))
return;
switch (Configuration.ActionType)
{
case "Kick":
player.Kick(Configuration.Message);
break;
case "Message":
player.SayToChat(Configuration.Message);
break;
case "TimedMessage":
player.Message(Configuration.Message, Configuration.TimedMessageLength);
break;
default:
break;
}
}
}
public class TTVConfig : ModuleConfiguration
{
// Possible: Kick | Message | TimedMessage
public string ActionType = "Kick";
public string Message = "We don\'t like you.";
public float TimedMessageLength = 5.0f;
}
}